Execute Trades
Execute a trade against a quote using the Cybrid API.
Execute a trade
After generating a quote, execute a trade via POST /api/trades.
The only required field is the quote GUID:
{
"quote_guid": "your_quote_guid"
}{
"guid": "your_trade_guid",
"customer_guid": "your_customer_guid",
"quote_guid": "your_quote_guid",
"symbol": "BTC-USD",
"side": "buy",
"state": "storing",
"receive_amount": 10000000,
"deliver_amount": 293063,
"fee": 0,
"created_at": "2022-05-11T19:56:42.856Z"
}
Quote expirationThe quote must be less than 30 seconds old. Expired quotes cannot be traded.
Check trade status
Poll GET /api/trades/{trade_guid} to verify the trade completed:
{
"guid": "your_trade_guid",
"customer_guid": "your_customer_guid",
"quote_guid": "your_quote_guid",
"symbol": "BTC-USD",
"side": "buy",
"state": "completed",
"receive_amount": 10000000,
"deliver_amount": 293063,
"fee": 0,
"created_at": "2022-05-11T19:56:42.856Z"
}Trade states
| State | Description |
|---|---|
storing | Trade details are being stored |
initiating | Trade execution has begun |
settling | Platform is waiting for the trade to settle |
completed | Trade successfully completed |
failed | Trade could not be completed |
Updated 12 days ago
