SwapTaxi development

SwapTaxi API v1

Fixed-rate crypto swaps routed through the exchange provider you pick. Base URL: https://dev.swaptaxi.com/api/v1. All requests and responses are JSON. Amounts are decimal strings - never floats.

Authentication

Every request needs your API key in the Authorization header. Your key is issued when your (invite-only) account is created and can be rotated from your dashboard.

Authorization: Bearer stx_your_api_key

Rate limit: 120 requests/minute per key. Exceeding it returns 429.

Concepts

  • Provider - the exchange account your funds are sourced from and swapped on (e.g. kraken). Each provider supports its own assets, networks, minimums, maximums and daily caps. One quote = one provider. One order = one provider.
  • Fixed-rate quote - amount_out is exactly what the destination receives. Quotes expire (see expires_at); create the order before then.
  • Routing - if the provider you chose becomes unavailable between quote and order (limit reached, disabled), we automatically route through another provider that can honour your quoted amount_out. Only if no provider is available is the order rejected with no_provider_available.
  • Deposits - every order gets a unique deposit address. If you send a different amount than quoted, we process what arrives (at the locked rate) as long as it is above the minimum; below-minimum deposits are refunded.

GET /assets

GET/api/v1/assets

Supported assets and networks.

curl https://dev.swaptaxi.com/api/v1/assets -H "Authorization: Bearer stx_..."

{
  "assets": [
    { "symbol": "SOL",  "name": "Solana",   "decimals": 9, "networks": ["solana"] },
    { "symbol": "USDC", "name": "USD Coin", "decimals": 6, "networks": ["solana"] }
  ],
  "networks": [ { "id": "solana", "name": "Solana" } ]
}

GET /providers

GET/api/v1/providers

Providers currently accepting orders, with the assets/networks each supports and its limits (in asset units). Only enabled providers are listed.

{
  "providers": [
    {
      "id": "kraken", "name": "Kraken",
      "assets": [
        { "asset": "SOL",  "network": "solana", "deposit": true, "withdraw": true, "min_deposit": "0.05", "max_deposit": null, "min_withdraw": "0.02", "withdraw_fee": "0.0025" },
        { "asset": "USDC", "network": "solana", "deposit": true, "withdraw": true, "min_deposit": "5", "max_deposit": null, "min_withdraw": "5", "withdraw_fee": "1" }
      ]
    }
  ]
}

GET /limits

GET/api/v1/limits?provider=kraken&from_asset=USDC&from_network=solana&to_asset=SOL&to_network=solana

Effective minimum and maximum for a route on a provider, in units of from_asset. Global limits and provider limits are combined - the stricter one wins.

{ "provider": "kraken", "from_asset": "USDC", "to_asset": "SOL", "min_amount": "20", "max_amount": "25000" }

POST /quote

POST/api/v1/quote
FieldTypeDescription
providerstringProvider id, e.g. kraken
from_asset, from_networkstringWhat you send, e.g. USDC / solana
to_asset, to_networkstringWhat the destination receives
amountstringAmount of from_asset you will send
curl -X POST https://dev.swaptaxi.com/api/v1/quote \
  -H "Authorization: Bearer stx_..." -H "Content-Type: application/json" \
  -d '{"provider":"kraken","from_asset":"USDC","from_network":"solana","to_asset":"SOL","to_network":"solana","amount":"250"}'

{
  "quote": {
    "id": "q_8kZ...", "provider": "kraken", "type": "fixed",
    "from_asset": "USDC", "from_network": "solana", "to_asset": "SOL", "to_network": "solana",
    "amount_in": "250", "amount_out": "1.6283", "rate": "0.0065132", "usd_value": "250.00",
    "created_at": "2026-09-29T12:00:00.000Z", "expires_at": "2026-09-29T12:10:00.000Z", "used": false
  }
}

If the provider cannot serve this route/size you get 422 provider_unavailable with reasons and, when other providers could, an alternatives list so you can re-quote with one of them.

POST /orders

POST/api/v1/orders
FieldTypeDescription
quote_idstringAn unexpired, unused quote you created
destination_addressstringWhere to send to_asset (validated for the network)
refund_addressstring, optionalWhere to return from_asset if the order cannot be processed
{
  "order": {
    "id": "ST-7K2M-9QAB-X3ZD", "status": "waiting", "provider": "kraken", "type": "fixed",
    "from_asset": "USDC", "from_network": "solana", "to_asset": "SOL", "to_network": "solana",
    "expected_amount_in": "250", "amount_out": "1.6283", "rate": "0.0065132",
    "deposit_address": "9ynF1bjPFoyncXyaHhA7vTc2ajdqDsqpefqhrSSXH9db",
    "payment_uri": "solana:9ynF1b...?amount=250&spl-token=EPjFW...&label=SwapTaxi",
    "destination_address": "...", "refund_address": null,
    "received_amount": null, "deposit_tx": null, "payout_tx": null,
    "created_at": "...", "expires_at": "...", "completed_at": null
  }
}

Show the customer deposit_address (or render payment_uri as a QR code). The order expires if nothing arrives before expires_at.

GET /orders/:id

GET/api/v1/orders/ST-7K2M-9QAB-X3ZD

Poll for status. Same shape as above. Poll every 10-30 seconds; deposits are usually detected within seconds of confirmation.

GET /orders

GET/api/v1/orders?limit=50&offset=0

Your orders, newest first.

Order statuses

StatusMeaning
waitingOrder created, waiting for your deposit
confirmingDeposit seen on-chain, waiting for confirmation
exchangingDeposit confirmed; routing through the provider and swapping
sendingPayout sent to the destination, waiting for on-chain confirmation
finishedDestination received amount_out
on_holdOur team is reviewing the order; it will continue or be refunded
refundedDeposit returned to refund_address
expiredNo deposit arrived in time (a late deposit is still processed)
cancelledCancelled before any deposit

Errors

{ "error": { "code": "provider_unavailable", "message": "...", "reasons": ["amount below minimum 20 USDC"], "alternatives": [ { "provider": "coinbase", "amount_out": "1.62" } ] } }
HTTPcodeWhen
400invalid_request, invalid_address, unknown_providerBad input
401unauthorizedMissing/invalid API key
404not_found, quote_not_foundUnknown id
422provider_unavailable, no_provider_available, quote_expired, quote_usedCannot fulfil
429rate_limitedSlow down
503quotes_paused, orders_pausedWe are temporarily not accepting new quotes/orders

Questions: support@swaptaxi.com · Telegram @swaptaxi