Derivatives-trading-coin-futures request on Binance using authenticated API endpoints. Requires API key and secret key for certain endpoints. Return the result in JSON format.
Quick Reference
Endpoint
Description
Required
Optional
Authentication
/dapi/v1/account (GET)
Account Information (USER_DATA)
None
recvWindow
Yes
/dapi/v1/balance (GET)
Futures Account Balance (USER_DATA)
None
recvWindow
Yes
/dapi/v1/positionSide/dual (GET)
Get Current Position Mode(USER_DATA)
None
recvWindow
Yes
/dapi/v1/positionSide/dual (POST)
Change Position Mode(TRADE)
相关技能
dualSidePosition
recvWindow
Yes
/dapi/v1/order/asyn (GET)
Get Download Id For Futures Order History (USER_DATA)
startTime, endTime
recvWindow
Yes
/dapi/v1/trade/asyn (GET)
Get Download Id For Futures Trade History (USER_DATA)
startTime, endTime
recvWindow
Yes
/dapi/v1/income/asyn (GET)
Get Download Id For Futures Transaction History(USER_DATA)
startTime, endTime
recvWindow
Yes
/dapi/v1/order/asyn/id (GET)
Get Futures Order History Download Link by Id (USER_DATA)
downloadId
recvWindow
Yes
/dapi/v1/trade/asyn/id (GET)
Get Futures Trade Download Link by Id(USER_DATA)
downloadId
recvWindow
Yes
/dapi/v1/income/asyn/id (GET)
Get Futures Transaction History Download Link by Id (USER_DATA)
type: 1: Add position margin,2: Reduce position margin
amount: (e.g., 1.0)
batchOrders: order list. Max 5 orders
quantity: quantity measured by contract number, Cannot be sent with closePosition=true (e.g., 1.0)
price: (e.g., 1.0)
reduceOnly: "true" or "false". default "false". Cannot be sent in Hedge Mode; cannot be sent with closePosition=true(Close-All)
newClientOrderId: A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[\.A-Z\:/a-z0-9_-]{1,36}$ (e.g., 1)
stopPrice: Used with STOP/STOP_MARKET or orders. (e.g., 1.0)
Credentials requested: Mask secrets (show last 5 chars only)
Listing accounts: Show names and environment, never keys
Account selection: Ask if ambiguous, default to main
When doing a transaction in mainnet, confirm with user before by asking to write "CONFIRM" to proceed
New credentials: Prompt for name, environment, signing mode
Adding New Accounts
When user provides new credentials:
Ask for account name
Ask: Mainnet, Testnet
Store in TOOLS.md with masked display confirmation
Signing Requests
For trading endpoints that require a signature:
Build query string with all parameters, including the timestamp (Unix ms).
Percent-encode the parameters using UTF-8 according to RFC 3986.
Sign query string with secretKey using HMAC SHA256, RSA, or Ed25519 (depending on the account configuration).
Append signature to query string.
Include X-MBX-APIKEY header.
Otherwise, do not perform steps 3–5.
New Client Order ID
For endpoints that include the newClientOrderId parameter, the value must always start with agent-. If the parameter is not provided, agent- followed by 18 random alphanumeric characters will be generated automatically. If a value is provided, it will be prefixed with agent-
Example: agent-1a2b3c4d5e6f7g8h9i
User Agent Header
Include User-Agent header with the following string: binance-derivatives-trading-coin-futures/1.0.0 (Skill)