Documentation Index
Fetch the complete documentation index at: https://stabyl.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use staging while building automation. Keep X-Api-Key in a backend service, job runner, or secure internal tool. Never expose it in browser, mobile, desktop, or user-controlled code.
export STABYL_BASE_URL="https://api-staging.stabyl.com/v1"
export STABYL_API_KEY="sb_test_..."
Use staging keys against staging URLs and production keys against production URLs. Treat cross-environment authentication failures as configuration errors, not transient failures.
1. List supported chains
curl "$STABYL_BASE_URL/partner/wallets/chains"
This route is public. Use it to decide which chain options to show before you request a crypto deposit address.
2. Request a Tron deposit address
curl "$STABYL_BASE_URL/partner/wallets/crypto/address?chain=tron" \
-H "X-Api-Key: $STABYL_API_KEY"
Addresses are created only when requested for a chain. Store the returned chain, optional slug, address, and memo exactly as returned.
3. Read balances
curl "$STABYL_BASE_URL/partner/wallets/balances/overview" \
-H "X-Api-Key: $STABYL_API_KEY"
Use available for actions that require spendable balance. Use locked to explain funds committed to pending activity.
4. Create an order
curl "$STABYL_BASE_URL/partner/exchange/orders" \
-X POST \
-H "Content-Type: application/json" \
-H "X-Api-Key: $STABYL_API_KEY" \
-H "Idempotency-Key: 0198b730-7cc2-79e4-b04e-5b5c41a50221" \
-d '{
"pair_id": "USD/NGN",
"side": "buy",
"order_type": "limit",
"price": "1520.00",
"quantity": "100.00"
}'
Order creation is asynchronous. A successful response means the request was accepted for processing, not that the order is filled.
5. Read Order Status
curl "$STABYL_BASE_URL/partner/exchange/orders/0198b731-2830-7f5d-a10d-7a5fda480491" \
-H "X-Api-Key: $STABYL_API_KEY"
6. Reconcile Wallet Activity
curl "$STABYL_BASE_URL/partner/wallets/transactions?limit=50" \
-H "X-Api-Key: $STABYL_API_KEY"
Store the returned cursor and continue paging until next_cursor is null. Reconciliation jobs should be restartable and should tolerate records arriving after confirmation or settlement updates.