Added expected price endpoint
{
"fee_payer": "xxx",
"symbol": "SOL",
"side": "Long",
"size": 1.0,
"expected_price": "150...." *
"collateral": 10.0,
"size_denomination": "SOL",
"collateral_denomination": "USDC",
"adjustment_type": "Increase",
"target_venues": ["Jupiter"],
"slippage_bps": "10"
}
Added Trade History Endpoint
Parameters:
public_key (required): Solana wallet address (43-44 characters)
platforms (optional): Platform name (DRIFT, FLASH, JUPITER, ADRENA)
symbols (optional): Trading pair (BTC-PERP, SOL-PERP, ETH-PERP)
start_time (optional): Start time in ISO 8601 format with UTC timezone
end_time (optional): End time in ISO 8601 format with UTC
curl -X GET "<https://data-api-staging-437363704888.asia-northeast1.run.app/v1/trade_history?public_key=RANTf8vmj5A31zpNzNiGEeEGZigr9bznSQFCo5KrL17&platforms[]=DRIFT&platforms[]=FLASH&symbols[]=SOL-PERP&start_time=2024-02-18T00:00:00Z>" \\
-H "x-api-key: sk_live_Q5HB1pVm19nrXzo2MOpq5rPwaCq9nmsJ"
curl -X GET "<https://data-api-staging-437363704888.asia-northeast1.run.app/v1/trade_history?public_key=RANTf8vmj5A31zpNzNiGEeEGZigr9bznSQFCo5KrL17&platforms[]=DRIFT&symbols[]=SOL-PERP>" \\
-H "x-api-key: sk_live_Q5HB1pVm19nrXzo2MOpq5rPwaCq9nmsJ"
{
"trades": [
{
"id": "uuid",
"symbol": "SOL-PERP",
"side": "Long/Short",
"quantity": 1.5,
"entry_price": 24.5,
"fill_price": 24.52,
"position_leverage": 4.0,
"realized_pnl": 15.0,
"fees_paid": 0.25,
"order_type": "Market/Limit",
"order_action": "Open/Close",
"is_closed": true,
"created_at": "2024-02-20T00:00:00Z",
"opened_at": "2024-02-20T00:00:00Z",
"platform": "DRIFT",
"tx_signature": "solana_transaction_signature"
}
]
}
Position API Fixes