Documentation Index
Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt
Use this file to discover all available pages before exploring further.
Beta Feature
The Trading API is currently in beta and subject to change. For participation details, contact your Fireblocks Customer Success Manager or email CSM@fireblocks.com.Prerequisites
Before you begin, ensure you have completed the prerequisites outlined in the Trading API Overview:- ✅ Fireblocks API credentials configured
- ✅ Fireblocks TypeScript SDK installed (
@fireblocks/version 13.x or later) - ✅ Connected account(s) set up with your chosen provider(s) via the Fireblocks Console (see Fireblocks Connected Accounts for setup instructions)
SDK Setup
First, set up your Fireblocks SDK client:Provider and account discovery
Before trading with account-based providers, find out which providers are available and which accounts you have connected. If you haven’t connected any accounts yet, see Fireblocks Connected Accounts for setup instructions.Step 1: Get Providers and Connected Accounts
Retrieve all trading providers. For account-based providers, the response includes provider information and connected accounts, allowing you to extract bothproviderId and accountId in a single call.
Response Example
Key Fields Explained
| Field | Description |
|---|---|
id | Unique identifier for the provider (use as providerId in subsequent API calls) |
name | Display name of the provider |
accountBased | true for account-based providers, false for direct access providers |
connected | Whether you have at least one connected account with this provider |
accounts | Array of connected accounts for this provider. Each account has an id (use as accountId in subsequent API calls) and name |
For more details about this endpoint, see the Get Providers API Reference.
Step 2: Get Supported Trading Pairs
For each connected account, discover which trading pairs are supported:Step 3: Get Indicative Rates
Get indicative rates for price preview (these are not executable quotes):Note: Rates provide indicative prices for preview, while quotes return committed rates that can be executed until expiration.
Clarification on how to translating user intent into baseAssetId, quoteAssetId, side, and baseAmount
When creating a Quote or an Order, you express the trade using:baseAssetId: the asset you receive on BUY / give on SELLquoteAssetId: the counter asset used to pay/receiveside:BUY: receive base / pay quoteSELL: give base / receive quote
baseAmount: amount inbaseAssetIdBUY: base amount to receiveSELL: base amount to sell
Examples
| Intent | baseAssetId | quoteAssetId | side | baseAmount |
|---|---|---|---|---|
| Buying 100 BTC with USD | BTC | USD | BUY | 100 |
| Buying 100 USD with BTC | USD | BTC | BUY | 100 |
| Selling 100 BTC for USD | BTC | USD | SELL | 100 |
| Selling 100 USD for BTC | USD | BTC | SELL | 100 |
Participants & compliance
Participant details vary by provider and rail. TheparticipantsIdentification object defines the originator and beneficiary involved in an order.
Example structure
Key concepts
- First-party: Acting for self — provider already holds KYC; minimal data required.
- Third-party: Acting for another — provider may require full PII.
Use Case Examples
The following sections demonstrate different trading use cases with account-based providers:Use Case 1: On-Ramp - DVP Settlement with Market Execution
Use Case: Convert fiat to crypto at the market rate. The user creates the order, receives payment instructions from the provider, deposits the funds, and once payment is confirmed, the provider executes and settles the crypto, ensuring delivery versus payment (DVP). Settlement Type: DVP (Delivery vs Payment)Execution Type: Market
Note: The baseAssetId, baseAssetRail, quoteAssetId, and quoteAssetRail values used in the order must match a supported trading pair returned from the getTradingPairs endpoint (see Step 2 in Getting Started). This ensures the provider supports the specific asset and rail combination you’re requesting.
Step 1: Create the Order
Step 2: Handle Payment Instructions
Since the settlement type is DVP and the source type is EXTERNAL, the funds will move from outside Fireblocks. The order creation response will include payment instructions for the rail which you select (e.g., ACH, SEPA, Wire):Considerations
- For third-party payouts, like the one in the example, the provider must receive the beneficiary details (PII as required by the provider). In this case, you are the originator — acting as a first party, already KYC’d with the provider. Therefore, the only data needed is to set the
beneficiary.participantRelationshipType = "FirstParty". - Since the settlement type is DVP and the source type is EXTERNAL, the funds will move from outside Fireblocks. As a result, the order creation response will include payment instructions for the rail which you select (e.g., ACH, SEPA, Wire).
Use Case 2: On-Ramp - Prefunded settlement with quote execution
Use Case: Convert fiat to crypto at a locked rate from a committed quote. Funds are already held in the account; no payment instructions are returned in the response, and the provider will execute and settle the request immediately. Settlement Type: PrefundedExecution Type: Quote
Step 1: Create a Quote
id) and expiration time (expiresAt). The quote ID is then used in the next step to create an order and execute the trade.
Step 2: Execute order with quote
Considerations
- In this example, you perform an on-ramp for yourself, not for a third-party recipient. Therefore, both the originator and beneficiary use
"participantRelationshipType": "FirstParty", and no additional PII data is required. - The
quoteIdused in the order request is the same ID returned in the response from thePOST /trading/quotescall.
Use Case 3: Off-Ramp - DVP settlement with market execution
Use Case: Convert crypto to fiat at the market rate. The provider waits for confirmation of the crypto deposits before finalizing the settlement, ensuring delivery versus payment (DVP). Settlement Type: DVPExecution Type: Market
Note: The baseAssetId, baseAssetRail, quoteAssetId, and quoteAssetRail values used in the order must match a supported trading pair returned from the getTradingPairs endpoint (see Step 2 in Getting Started). This ensures the provider supports the specific asset and rail combination you’re requesting.
Step 1: Create the Order
Considerations
- In this example, you perform an off-ramp for yourself, not for a third-party recipient. Therefore, both the originator and beneficiary use
"participantRelationshipType": "FirstParty", and no additional PII data is required. - In this example, you chose to use a whitelisted account as the destination fiat account type. This allows you to register and manage external bank accounts (and also crypto addresses) directly within Fireblocks, ensuring secure, verified destinations that can be safely reused for future orders and transactions.
- Since the source of this order is a Vault Account, once the provider receives the order request, a transfer request will be automatically created from your vault to the provider. You will then need to approve and sign this transfer in accordance with the workspace’s policy rules before the order can be executed.
Use Case 4: Bridging (Crypto-to-Crypto) - DVP settlement with quote execution
Use Case: Execute a cross-chain bridging operation through the provider’s connected accounts. In this flow, the user swaps USDT on Ethereum for USDT on Tron using their Scrypt provider account. Settlement Type: DVPExecution Type: Quote
Step 1: Create a Quote
id) and expiration time (expiresAt). The quote ID is then used in the next step to create an order and execute the trade.
Step 2: Execute Order with Quote
Considerations
- In this example, you perform bridging via a connected account for yourself, not for a third-party recipient. Therefore, both the originator and beneficiary use
"participantRelationshipType": "FirstParty", and no additional PII data is required. - The
quoteIdused in the order request is the same ID returned in the response from thePOST /trading/quotescall. - Since the source of this order is a Vault Account, once the provider receives the order request, a transfer will automatically be initiated from your Vault Account to the provider’s connected account on Scrypt. This transfer is governed by the workspace’s Transfer Policy, just like any other transfer in Fireblocks.
- ReQuote Option: Instead of
"type": "MARKET", you can use"type": "RETRY"withcount(1-10 retry attempts) and optionalslippageBps(slippage tolerance in basis points) to automatically retry quote generation if the original quote expires, giving you more control over price execution.
Order Tracking & Monitoring
After creating an order, monitor its execution status to track completion.Polling for order status
Order Status Values
| Status | Description |
|---|---|
CREATED | Order has been created and is being processed |
AWAITING_PAYMENT | Waiting for payment to be received |
PENDING_USER_ACTION | Requires user action (e.g., approval in console) |
PROCESSING | Order is being executed |
COMPLETED | Order has been successfully completed |
FAILED | Order execution failed |
CANCELED | Order was canceled |
Note: FAILED, COMPLETED and CANCELED are terminal states.
Webhooks
Subscribe to order-update events through the Fireblocks Webhooks API. See the Fireblocks Webhooks API documentation for more details.Additional Resources
- Trading API Overview
- Bridging via Direct Access Providers (DeFi) - For crypto-to-crypto bridging using direct access providers like Uniswap
- Fireblocks SDKs: Python | TypeScript | Java
- Fireblocks Developer Portal
Support
For questions or issues with the Trading API:- Contact your Fireblocks Customer Success Manager
- Email: CSM@fireblocks.com
- Check the Fireblocks Developer Portal for updates