Partner API
Add frUSD, frBTC and frSPY deposits and withdrawals to your app. The API provides quotes and unsigned transactions. Your user's wallet signs and sends each transaction.
API access
Ferno Labs issues and revokes partner keys by hand. Contact Fire Strategy on X to request a key for your app.
Store the key as FIRESTRAT_API_KEY on your server.
Send it in the Authorization header as Bearer <key>.
Keep the key out of browser code and URLs.
Quick start
1. Prepare the request
Use GET /tokens to find the supported asset mints and their decimals.
This example deposits 1 USDC for frUSD. Replace YOUR_SOLANA_WALLET with the user's
wallet address. The wallet needs USDC for the deposit and SOL for fees.
export FIRESTRAT_API_URL=https://api.firestrat.xyz/v1
curl --fail-with-body "$FIRESTRAT_API_URL/tokens" cat > action.json <<'JSON'
{
"token": "frUSD",
"action": "deposit",
"wallet": "YOUR_SOLANA_WALLET",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000",
"slippageBps": 50
}
JSON Set amount to a string in the smallest unit of the deposit asset.
For a withdrawal, use the smallest unit of the share token and set asset to the requested withdrawal asset mint.
2. Get a quote
Show the user the estimated and minimum outputs and any additional token debits.
curl --fail-with-body "$FIRESTRAT_API_URL/quote" \
-H "Authorization: Bearer $FIRESTRAT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @action.json 3. Build the next step
Send the same action to the build endpoint. Add includeInstructions=true to get the ordered instruction plan, with account permissions, fee payer, message version
and any lookup table addresses.
curl --fail-with-body "$FIRESTRAT_API_URL/build?includeInstructions=true" \
-H "Authorization: Bearer $FIRESTRAT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @action.json - Check the latest
quotein the build response before asking the user to sign. A withdrawal that requires a USDG debit needsacceptDebits: trueafter the user approves it. - If the build returns a setup step, send it as a separate transaction. Wait for confirmation, then get a new quote and build the action.
- If you use the instruction plan, keep the instruction and account order. Use the supplied transaction for atomic version 1 product steps unless your compiler supports their format. Simulate any transaction you compose before the wallet signs it.
Endpoints
Base URL https://api.firestrat.xyz/v1
| Endpoint | API key | Purpose |
|---|---|---|
GET /tokens | Public | Supported tokens, asset mints and deposit status |
GET /openapi.json | Public | OpenAPI reference |
POST /quote | Required | Estimated and minimum outputs and any extra debits |
POST /build | Required | Simulated unsigned transaction for the next step |
GET /positions/{wallet} | Required | Wallet balances and values |
GET /transactions/{signature} | Required | Transaction status and receipt |