Credentials & Wallets
Connect your exchange accounts and set up your Sequence Wallet for DEX trading.
Security: Only grant read and trade permissions for CEX API keys. Never enable withdrawals. We encrypt all credentials with AES-256-GCM before storage.
Sequence Wallet
Your Sequence Wallet is an MPC-secured wallet that lets you trade on-chain (DEX) via the API without keeping your browser open. It's automatically provisioned when you connect MetaMask on the dashboard.
How it works
- Connect MetaMask on the dashboard (Settings → Wallets)
- Your Sequence Wallet is auto-provisioned in the background (~5 seconds)
- Fund it — send ETH (for gas) and USDC (for trading) from MetaMask to your Sequence Wallet address
- Trade via API — submit orders without
wallet_id; they auto-route to your Sequence Wallet - Withdraw anytime — send funds back to your MetaMask via the dashboard or API
Your private keys never leave the secure enclave. The Sequence Wallet signs transactions server-side, so you can trade programmatically without a browser connection.
List Wallets
/v1/walletsReturns all wallets for the authenticated user.
{
"wallets": [
{
"wallet_id": "turnkey:0x7f3a...d21e",
"address": "0x7f3a...d21e",
"role": "trading",
"signer_backend": "turnkey",
"status": "ready",
"can_trade_api": true
},
{
"wallet_id": "connected:0x082a...c859",
"address": "0x082a...c859",
"role": "connected",
"signer_backend": "connected",
"status": "ready",
"can_trade_api": false
}
]
}| Field | Description |
|---|---|
role | trading (Sequence Wallet for API trading) or connected (browser wallet) |
status | provisioning, ready, failed, or disabled |
can_trade_api | true if this wallet can execute DEX orders without the browser |
Get Trading Wallet
/v1/wallets/tradingReturns the trading (Sequence Wallet) details. Alias: GET /v1/wallets/default.
Create Trading Wallet Manually
/v1/wallets/trading/create-turnkeyManually provision a Sequence Wallet. This is normally done automatically when you connect MetaMask, but you can also trigger it via API.
{
"label": "My Trading Wallet"
}Returns 409 if a trading wallet already exists or is being provisioned.
Fund Your Sequence Wallet
Send tokens to your Sequence Wallet address (shown in GET /v1/wallets). You need:
- ETH for gas (~0.001 ETH on Arbitrum, ~$2)
- USDC for the actual trades
You can fund from the dashboard (Settings → Wallets → Fund) or by sending a standard transfer from any wallet.
Withdraw
/v1/wallets/withdrawSend tokens from your Sequence Wallet back to an external address.
{
"chain": "arbitrum",
"token": "USDC",
"amount": "100.0",
"recipient": "0x082a74ff138843b60eda88f131c54054c96ac859"
}Order Routing
When you submit a DEX order via POST /v1/orders:
wallet_id | Behavior |
|---|---|
| Omitted | Auto-resolves to your Sequence Wallet (recommended for API trading) |
connected:0x... | Signs via MetaMask in the browser (requires dashboard open) |
turnkey:0x... | Explicitly targets your Sequence Wallet |
If no Sequence Wallet exists, the API returns NO_TRADING_WALLET (404). If it's still being provisioned, you get TRADING_WALLET_NOT_READY (409).
List Connected Venues
/v1/credentialsList venues you have credentials for.
Response
{
"venues": ["kraken", "coinbase", "binance", "kalshi", "polymarket"]
}Set Credentials
/v1/credentials/{venue}Add or update credentials for a venue. Overwrites any existing row for (client, venue).
Path Parameters
| Parameter | Description |
|---|---|
venue | kraken, coinbase, binance, bitget, cryptocom, bitmart, okx, bybit, hyperliquid, kalshi, polymarket |
Request Body (Kraken / Binance / Bitget / Crypto.com / BitMart)
{
"api_key": "your-api-key",
"api_secret": "your-api-secret"
}Request Body (Coinbase)
Coinbase requires additional fields:
{
"api_key": "your-api-key-id",
"api_secret": "-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----",
"passphrase": "optional-passphrase"
}Coinbase uses EC private keys for signing. Export from the Coinbase Developer Portal.
Request Body (Kalshi)
Kalshi uses an API key ID + RSA private key. Orders are signed with RSA-PSS over SHA-256.
{
"api_key": "dc9d0cd5-076a-4ea8-b406-1847279dac4b",
"api_secret": "-----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----"
}api_key= the Kalshi API key ID (UUID shown in the Kalshi dashboard).api_secret= the full PEM of the paired private key. Both PKCS#1 (BEGIN RSA PRIVATE KEY) and PKCS#8 (BEGIN PRIVATE KEY) are accepted.
Request Body (Polymarket)
Polymarket orders are EIP-712 signed client-side from an EVM signer key. Sequence derives the CLOB L2 credentials from that signer on first use (calling Polymarket's /auth/derive-api-key under the hood), so you only need to supply the signer material in extra_json:
{
"api_key": "",
"api_secret": "",
"extra_json": {
"signer_private_key": "0xyour-32-byte-private-key",
"proxy_address": "0xoptional-proxy-wallet-address",
"builder": "0xoptional-builder-code-address"
}
}| Field | Required | Description |
|---|---|---|
extra_json.signer_private_key | ✓ | Hex-encoded EVM private key that will sign every EIP-712 order. |
extra_json.proxy_address | ✗ | Polymarket proxy (funder) wallet. Omit to use the signer address directly. Required when the USDC lives on the proxy. |
extra_json.builder | ✗ | Builder-code recipient — include only if you're enrolled in Polymarket's builder program. |
api_key / api_secret / passphrase | ✗ | Leave empty unless you already have L2 credentials and want to bypass auto-derivation. If supplied, Sequence uses them verbatim instead of calling /auth/derive-api-key. |
Sending api_key or api_secret as non-empty values without also supplying extra_json.signer_private_key will fail with "Polymarket orders require signer material in credentials.extra_json.signer_private_key". The signer key is the source of truth — L2 creds are a derived cache.
Polymarket fees are read per-token from the CLOB's fee_schedule broadcast on market-data WS and supplied in the signed order body as feeRateBps. There is no global override — the edge uses the rate the venue advertises for each token, honoring the taker_only flag for maker vs. taker orders.
Response
{
"venue": "kalshi",
"status": "stored"
}Delete Credentials
/v1/credentials/{venue}Remove credentials for an exchange.
Response
{
"venue": "kraken",
"deleted": true
}Get Positions
Balances and positions are unified into one endpoint. See Positions — use GET /v1/positions?kinds=fiat,crypto for the old balances() shape.
Fee Tiers
Your per-venue maker/taker fee tier is fetched automatically in the background whenever you POST /v1/credentials/{venue} — the edge probes the venue's fee endpoint (where supported) and caches the result. The cached tier feeds the SOR cost model and TCA reports; it isn't exposed as a standalone read endpoint. If the probe fails (API lacks the permission, venue doesn't expose it), SOR falls back to hardcoded per-venue defaults.
API Key Management
Sequence uses two key prefixes to distinguish live and sandbox environments:
| Prefix | Mode | Description |
|---|---|---|
seq_live_ | Live | Real orders on real exchanges |
seq_test_ | Sandbox | Paper trading - live market data, no real orders |
The key prefix determines the mode automatically on the server side. All API endpoints respect this: a seq_test_ key can only interact with sandbox infrastructure (sandbox edges, sandbox algo deployments), and a seq_live_ key only interacts with live infrastructure. The two modes are fully isolated - same client, same symbol, different modes.
List API Keys
/v1/api_keysReturns all API keys for the authenticated client.
{
"keys": [
{
"id": "a1b2c3d4-...",
"key_prefix": "seq_live_94b98a3c",
"label": "production",
"is_active": true,
"last_used_at": "2026-02-28T12:00:00Z",
"created_at": "2026-01-15T08:00:00Z"
}
]
}Create API Key
/v1/api_keys{
"label": "my-new-key",
"sandbox": false
}| Field | Required | Default | Description |
|---|---|---|---|
label | No | null | Human-readable label for the key |
sandbox | No | false | If true, creates a seq_test_ (sandbox) key instead of seq_live_ (live) |
Response:
{
"id": "a1b2c3d4-...",
"key_prefix": "seq_live_f8a2b1c0",
"raw_key": "seq_live_f8a2b1c0..."
}To create a sandbox key for paper trading:
{
"label": "paper-trading",
"sandbox": true
}Returns a seq_test_ key:
{
"id": "b2c3d4e5-...",
"key_prefix": "seq_test_a1b2c3d4",
"raw_key": "seq_test_a1b2c3d4..."
}The full raw_key is only returned once at creation time. Store it securely - it cannot be retrieved again.
If you're authenticated with a sandbox key (seq_test_), the sandbox field is ignored - sandbox sessions can only create sandbox keys.
Delete API Key
/v1/api_keys/{key_id}Deactivates the key. Cannot delete the key you're currently authenticated with.
Rotate API Key
/v1/api_keys/{key_id}/rotateAtomically deactivates the old key and creates a new one with the same label. Returns the new key:
{
"id": "new-key-uuid",
"key_prefix": "seq_live_d2e4f6a8",
"raw_key": "seq_live_d2e4f6a8..."
}Use rotation for zero-downtime key refresh. The old key is immediately invalidated.
Venue Setup Guides
Kraken→
- Go to Kraken API Settings
- Create new API key
- Enable: Query Funds, Query Orders, Create/Modify Orders, Cancel Orders
- Do NOT enable: Withdraw Funds
Coinbase→
- Go to Coinbase Developer Portal
- Create API key with Trade permissions
- Download the private key (PEM format)
- Use the key ID as
api_keyand PEM contents asapi_secret
Binance→
- Go to Binance API Management
- Create new API key
- Enable: Enable Spot Trading
- Restrict to your IP for security
Bitget→
- Go to Bitget API Management
- Create API key with Trade permissions
- Set passphrase (required by Bitget)
Crypto.com→
- Go to Crypto.com Exchange API
- Create API key with Spot Trading permissions
- Restrict to your IP for security
BitMart→
- Go to API Management in your BitMart account settings
- Create API key with Trade permissions
- Set memo (required by BitMart)
OKX→
- Go to OKX API Management
- Create API key with Trade permissions
- Set passphrase (required by OKX)
- Restrict to your IP for security
Bybit→
- Go to Bybit API Management
- Create API key with Spot Trading permissions
- Restrict to your IP for security
Hyperliquid→
- Go to Hyperliquid API Settings
- Generate an API wallet (agent wallet)
- Use the wallet address as
api_keyand private key hex asapi_secret - For vault trading, provide the vault address as
passphrase - Alternative: Use your Sequence Wallet — Sequence auto-derives Hyperliquid credentials from it
Kalshi→
- Go to Kalshi's API Keys page (Settings → API Keys)
- Create a new API key — Kalshi generates the key ID (UUID) and downloads an RSA private key as PEM
api_key= the key ID,api_secret= the complete PEM body (keep the-----BEGIN/END-----markers)- RSA-PSS over SHA-256 is the signing algorithm; Sequence handles that internally
- Symbols use Kalshi tickers directly (e.g.
KXBTCZ-26DEC31-T99000). See Prediction Markets for discovery.
Polymarket→
- Have an EVM wallet funded with USDC on Polygon, and (optionally) a Polymarket proxy wallet
- Export the signer's 32-byte private key (hex, with or without
0xprefix) - Submit with
api_keyandapi_secretempty; put the signer key inextra_json.signer_private_key - Set
extra_json.proxy_addressif your USDC is on a proxy rather than on the signer address - On first order, Sequence derives L2 CLOB credentials from the signer via
/auth/derive-api-keyand caches them in-memory — you never see the L2 key yourself - Symbols accept event slugs,
:yes/:noslug suffixes, raw CTF token IDs, or fullpolymarket.com/event/...URLs