fix: syntax error in drift-trading.ts
This commit is contained in:
@@ -28,20 +28,8 @@ export interface TradeParams {
|
|||||||
stopLossType?: 'PRICE' | 'PERCENTAGE'
|
stopLossType?: 'PRICE' | 'PERCENTAGE'
|
||||||
takeProfitType?: 'PRICE' | 'PERCENTAGE'
|
takeProfitType?: 'PRICE' | 'PERCENTAGE'
|
||||||
}
|
}
|
||||||
if (localTrades.length > 0) {
|
|
||||||
console.log(`📊 Found ${localTrades.length} trades in local database`)
|
export interface TradeResult {
|
||||||
return localTrades.map((trade: any) => ({
|
|
||||||
id: trade.id.toString(),
|
|
||||||
symbol: trade.symbol,
|
|
||||||
side: trade.side as 'BUY' | 'SELL',
|
|
||||||
amount: trade.amount,
|
|
||||||
price: trade.price,
|
|
||||||
status: trade.status as 'FILLED' | 'PENDING' | 'CANCELLED',
|
|
||||||
executedAt: trade.executedAt ? trade.executedAt.toISOString() : trade.createdAt.toISOString(),
|
|
||||||
pnl: trade.profit || 0,
|
|
||||||
txId: trade.driftTxId || trade.id
|
|
||||||
}))
|
|
||||||
}ace TradeResult {
|
|
||||||
success: boolean
|
success: boolean
|
||||||
txId?: string
|
txId?: string
|
||||||
error?: string
|
error?: string
|
||||||
|
|||||||
Reference in New Issue
Block a user