Create Trade Payload

post/api/trade/v1/enterprise/{enterpriseId}/account/{accountId}/payload

The Create Trade Payload API builds an unsigned trade payload, which serves as an authorization to move funds from your trading account to a counterparty's trading account. This payload must be cryptographically signed with your private key to authorize the movement of funds

Path Parameters

  • enterpriseIdstringRequired
    Enterprise ID
  • accountIdstringRequired
    Trading Account ID

Request Body

Parameters to serialize into a trade payload
version string
Payload version to create. It is recommended to specify the most recent version for maximum security and compatibility. Older payload versions are subject to deprecation at a later date.
Allowed value: 1.2.0
amounts array[object]
accountId string
Account ID that is authorizing to send and receive specified funds
Example: 59cd72485007a239fb00282ed480da1f
sendAmount string
Amount of the specified sendCurrency you will send as part of the authorized trade. This payload will not be valid for any trade that does not send the specified amount of the specified currency.
Example: 1000000
sendCurrency string
Currency you will send as part of the authorized trade. This payload will not be valid for any trade that does not send the specified currency.
Example: ofcbtc
receiveAmount string
Amount of the specified receiveCurrency you will receive as part of the authorized trade. This payload will not be valid for any trade that does not credit your account the specified amount.
Example: 3000
receiveCurrency string
Currency you will receive as part of the authorized trade. This payload will not be valid for any trade that does not credit your account the speified currency.
Example: ofcsud

200 Response

payload string
This payload must be cryptographically signed with a trading account's private key to authorize the movement of funds
Example: {"version":"1.2.0","accountId":"59cd72485007a239fb00282ed480da1f","amounts":[{"accountId":"5e20faa843795147000da79b8a01f757","sendSubtotal":"1000000","sendAmount":"1000000","sendCurrency":"ofctusd","receiveAmount":"1000000","receiveCurrency":"ofctbtc"},{"accountId":"59cd72485007a239fb00282ed480da1f","sendSubtotal":"1000000","sendAmount":"1000000","sendCurrency":"ofctbtc","receiveAmount":"1000000","receiveCurrency":"ofctusd"}],"nonceHold":"zq/aCtZC4XOlDyRGFdlsww==","nonceSettle":"FnG6xbzehNn0o/0Qt3UeUg=="}

400 Response

error string required
Human-readable error message
errorName string required
Immutable error code for API integration
reqId string required
Client request id