Create a trade quote
POST/v1/trades/quotes
Creates a trade quote between two assets for trading. Validates user membership has OTC_TRADE access and that the assets can be traded.
Request
- application/json
Body
required
Trade quote request
ID of the source asset to trade from
ID of the target asset to trade to
Amount of the source asset to trade
ID of the asset to pay fees with (must match either fromAssetId or toAssetId)
Possible values: [buy, sell]
Trading side: buy to purchase the base asset, sell to sell the base asset
Possible values: [direct, reverse]
Direction: direct if assets match available pair order, reverse if swapped
Responses
- 201
- 400
- 403
- 404
Trade quote created successfully
- application/json
- Schema
- Example (from schema)
Schema
data
object
Unique quote identifier for trade execution
Price per unit of the target asset
Fee percentage (as decimal)
Fee amount in the fee asset
Total price to pay for the trade
Total amount to receive after fees
Expiration timestamp for the quote
Disclaimer about trade execution
{
"traceId": "string",
"message": "string",
"data": {
"quoteId": "quote_123e4567-e89b-12d3-a456-426614174000",
"pricePerUnit": "45000.50",
"fee": 0.001,
"feeAmount": "1.50",
"totalPrice": "45001.50",
"totalToReceive": "0.999",
"expiresAt": "2024-01-15T10:30:00Z",
"disclaimer": "Quote expires in 5 minutes. Prices may change during execution."
}
}
Invalid request payload. This can happen if required fields are missing or have invalid formats.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}
The API key is invalid or the client does not have sufficient permissions.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}
One of the specified resources was not found. Does not apply for empty result set.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}