Execute Trade Order
This endpoint allows to execute a trade order.
Technical Details
- Webhooks: This operation triggers the
trade_transaction_createdwebhook.
Authorization:
bearer
HTTP: bearer
HTTP Authorization Scheme: bearer
Headers:
Authorization: APIKey {YOUR_API_KEY}
Endpoint
POST
/api/v2/trade/execute
Request Body Sample
{
"accountId": "00000000-0000-0000-0000-000000000000",
"product": "BTC-USD",
"type": "market",
"side": "buy",
"quantity": "1.5",
"quantityCurrency": "USD",
"previewId": "00000000-0000-0000-0000-000000000000",
"reference": "client-reference-123"
}
Request Body Schema
| Field | Type | Description |
|---|---|---|
accountId | uuid | Required. The account ID to trade from. |
product | string | Required. Product to trade (e.g., BTC-USD). |
type | string | Required. Must be set to "market". |
side | string | Required. Side of the trade ("buy" or "sell"). |
quantity | decimal | Required. Quantity to trade in the currency (must be positive). |
quantityCurrency | string | Required. Currency of the quantity. For buy orders: quote currency (e.g., USD). For sell orders: base currency (e.g., BTC). |
previewId | uuid | Optional. Preview ID from the preview response to attempt locking rates. See "Using Preview ID" section below. |
reference | string | Required. Client reference for the trade (must be unique per account). |
Using Preview ID
The previewId attempts to lock in the exchange rate and fees from the preview, but does not guarantee the exact same rates due to market fluctuations.
Important:
- You must send all required fields in the request body (not just the
previewId) - The
previewIdis an additional optional field to attempt rate locking - Final rates may still vary due to market conditions
Response Sample
{
"transactionId": "00000000-0000-0000-0000-000000000000"
}
Support and Resources
If you need assistance or have any questions, our support team is here to help. You can contact our support team at support@blockwyre.com.
Stay Updated
Stay up-to-date with the latest news, updates, and features from BlockWyre by following us on social media:
- Instagram: BlockWyre Instagram
- Twitter: BlockWyre Twitter
- Facebook: BlockWyre Facebook
- LinkedIn: BlockWyre LinkedIn
We are excited to have you on board and look forward to seeing how you leverage BlockWyre's powerful tools to enhance your financial operations. Happy integrating!