Tetrac
Back to App

Authentication Endpoints

login

POST/api/auth/login

Parameters:

email (string)*

User's email address

passKey (string)*

User's plaintext passkey — hashed server-side with SHA-256 and compared against the stored hash

Example Response:

{
  "success": true,
  "message": "Login successful",
  "user": {
    "email": "user@example.com",
    "publicKey": "CgzKjTLrNgi9B6iCzLKfcLasYTuuEUibsei97qjmm7t5",
    "type": "email",
    "lastLogin": "2026-04-15T12:34:56.789Z",
    "user_creation": "2025-11-20T09:10:11.000Z",
    "privateKey": "<client-encrypted blob>",
    "orderlyPublicKey": "0xabc...",
    "orderlyPrivateKey": "<client-encrypted blob>",
    "evmAddress": "0x1234...",
    "evmPrivateKey": "<client-encrypted blob>",
    "evmSigningAddress": "0x5678...",
    "evmSigningPrivateKey": "<client-encrypted blob>",
    "subscription_type": "pro",
    "subscription_tier": "monthly",
    "subscription_expire": "2026-05-15T12:34:56.789Z",
    "subscription_tx": "5xT...signature"
  },
  "authToken": "64-char-hex-token"
}

register

POST/api/auth/register

Parameters:

email (string)

User's email (optional for wallet users — server generates <pubKey>@ttc.box if omitted)

pubKey (string)*

User's Solana wallet address (public key)

hashedPasskey (string)*

SHA-256 hash of the user's passkey (hashed client-side — server never sees the plaintext)

clientGeneratedWallets (object)*

Client-generated wallet bundle: { solana: { publicKey, encryptedPrivateKey }, orderly: { publicKey, encryptedPrivateKey }, evm: { address, encryptedPrivateKey }, evmSigning: { address, encryptedPrivateKey } }. Orderly is required; others are optional.

Example Response:

{
  "success": true,
  "message": "User registered successfully",
  "authToken": "64-char-hex-token"
}

challenge

POST/api/auth/challenge

Parameters:

pubKey (string)*

Registered Solana public key

Example Response:

{
  "success": true,
  "challenge": "a1b2c3d4e5f6...",
  "message": "Sign this message to verify wallet ownership: a1b2c3d4e5f6..."
}

login-wallet

POST/api/auth/login-wallet

Parameters:

pubKey (string)*

User's Solana public key

signature (string)*

Hex-encoded ed25519 signature of the challenge message produced by the wallet

challenge (string)*

Challenge string returned by /api/auth/challenge (must match the stored challenge, valid for 5 minutes)

Example Response:

{
  "success": true,
  "message": "Wallet verified successfully",
  "user": {
    "email": "user@example.com",
    "publicKey": "CgzKjTLrNgi9B6iCzLKfcLasYTuuEUibsei97qjmm7t5",
    "type": "wallet",
    "lastLogin": "2026-04-15T12:34:56.789Z",
    "user_creation": "2025-11-20T09:10:11.000Z",
    "orderlyPublicKey": "0xabc...",
    "orderlyPrivateKey": "<client-encrypted blob>",
    "evmAddress": "0x1234...",
    "evmPrivateKey": "<client-encrypted blob>",
    "evmSigningAddress": "0x5678...",
    "evmSigningPrivateKey": "<client-encrypted blob>",
    "subscription_type": "pro",
    "subscription_tier": "monthly",
    "subscription_expire": "2026-05-15T12:34:56.789Z",
    "subscription_tx": "5xT...signature"
  },
  "authToken": "64-char-hex-token"
}

user-data

GETPUTPOST/api/auth/user-data

Parameters:

evmAddress (string)

PUT only — update main EVM wallet address (lowercased)

evmPrivateKey (string)

PUT only — client-encrypted main EVM private key blob

evmSigningAddress (string)

PUT only — update EVM signing wallet address (lowercased)

evmSigningPrivateKey (string)

PUT only — client-encrypted EVM signing private key blob

orderlyPublicKey (string)

PUT only — update Orderly wallet public key

orderlyPrivateKey (string)

PUT only — client-encrypted Orderly private key blob

preferences (object)

POST only — JSON preferences payload (stored stringified under preferenceKey)

preferenceKey (string)

POST only — name of the preference field to write on the user record

Example Response:

{
  "success": true,
  "message": "User data retrieved successfully",
  "user": {
    "email": "user@example.com",
    "publicKey": "CgzKjTLrNgi9B6iCzLKfcLasYTuuEUibsei97qjmm7t5",
    "type": "email",
    "lastLogin": "2026-04-15T12:34:56.789Z",
    "user_creation": "2025-11-20T09:10:11.000Z",
    "privateKey": "<client-encrypted blob>",
    "orderlyPublicKey": "0xabc...",
    "orderlyPrivateKey": "<client-encrypted blob>",
    "evmAddress": "0x1234...",
    "evmPrivateKey": "<client-encrypted blob>",
    "evmSigningAddress": "0x5678...",
    "evmSigningPrivateKey": "<client-encrypted blob>",
    "subscription_type": "pro",
    "subscription_tier": "monthly",
    "subscription_expire": "2026-05-15T12:34:56.789Z",
    "subscription_tx": "5xT...signature"
  },
  "authToken": "64-char-hex-token"
}

Conversation Endpoints

base

GET/api/conversation

Parameters:

limit (number)

Number of conversations to return

offset (number)

Number of conversations to skip

Example Response:

{
  "conversations": [
    {
      "id": "conv_123",
      "title": "Trading Strategy Discussion",
      "lastMessage": "What do you think about this setup?",
      "timestamp": "2024-02-06T04:03:46Z"
    }
  ],
  "total": 50
}

agents

GET/api/conversation/agents/[id]

Parameters:

id (string)*

Agent conversation ID

Example Response:

{
  "id": "agent_123",
  "messages": [
    {
      "role": "user",
      "content": "Can you analyze this market?",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "assistant",
      "content": "Based on the current indicators...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

coach

GET/api/conversation/coach/[id]

Parameters:

id (string)*

Coach conversation ID

Example Response:

{
  "id": "coach_123",
  "messages": [
    {
      "role": "user",
      "content": "How can I improve my trading?",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "coach",
      "content": "Let's analyze your recent trades...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

coder

GET/api/conversation/coder/[id]

Parameters:

id (string)*

Coder conversation ID

Example Response:

{
  "id": "coder_123",
  "messages": [
    {
      "role": "user",
      "content": "How do I implement this strategy?",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "coder",
      "content": "Here's a code implementation...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

manager

GET/api/conversation/manager/[id]

Parameters:

id (string)*

Manager conversation ID

Example Response:

{
  "id": "manager_123",
  "messages": [
    {
      "role": "user",
      "content": "How should I manage my portfolio?",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "manager",
      "content": "Based on your risk profile...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

oracle

GET/api/conversation/oracle/[id]

Parameters:

id (string)*

Oracle conversation ID

Example Response:

{
  "id": "oracle_123",
  "messages": [
    {
      "role": "user",
      "content": "What's your market prediction?",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "oracle",
      "content": "The market indicators suggest...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

specific

GET/api/conversations/[id]

Parameters:

id (string)*

Specific conversation ID

Example Response:

{
  "id": "conv_123",
  "title": "Strategy Discussion",
  "messages": [
    {
      "role": "user",
      "content": "Let's discuss this strategy",
      "timestamp": "2024-02-06T04:03:46Z"
    },
    {
      "role": "assistant",
      "content": "I see several key points...",
      "timestamp": "2024-02-06T04:03:47Z"
    }
  ]
}

Agents Endpoints

browse

GET/api/agents

Parameters:

limit (number)

Number of agents to return

Example Response:

{
  "agents": [
    {
      "id": 123,
      "name": "TradingBot",
      "description": "AI-powered trading assistant",
      "x402Support": true
    },
    {
      "id": 456,
      "name": "PriceOracle",
      "description": "Real-time price oracle",
      "x402Support": true
    }
  ],
  "total": 2
}

get

GET/api/agents/[id]

Parameters:

id (string)*

Agent ID

Example Response:

{
  "id": 123,
  "name": "TradingBot",
  "description": "AI-powered trading assistant",
  "services": [
    {
      "name": "ERC-8008 Messaging",
      "endpoint": "https://agent.example.com/messaging",
      "version": "1.0.0"
    },
    {
      "name": "PriceOracle",
      "endpoint": "https://agent.example.com/api",
      "version": "1.2.0"
    }
  ],
  "x402Support": true,
  "supportedTrust": [
    "reputation",
    "erc-8008"
  ],
  "active": true
}

post

POST/api/agents/[id]

Parameters:

name (string)*

Agent name

description (string)*

Agent description

services (array)*

Array of service objects

x402Support (boolean)

Whether agent accepts x402 payments

supportedTrust (array)

Supported trust mechanisms

Example Response:

{
  "success": true,
  "message": "Agent registered successfully",
  "agentId": 123
}

stats

GET/api/agents/eight-zero-zero-four/stats

Parameters:

agentId (string)*

Agent ID to get stats for

Example Response:

{
  "agentId": 123,
  "totalAgents": 1500,
  "activeAgents": 1420,
  "totalFeedback": 12500,
  "averageReputation": 78.5
}

DAO: /all-positions | USER: /position

trading-all-positions

GETPOST/api/dao/trading/all-positions

Parameters:

ttc-public-key (string)*

User's wallet public key)

ttc-auth-token (string)*

User's auth token for session authentication

Parameters:

position (object)*

Position object

Example Response:

{
  "positions": [
    {
      "symbol": "BTCUSDT",
      "side": "buy",
      "size": 0.01,
      "entryPrice": 22000,
      "markPrice": 22500,
      "pnl": 5,
      "timestamp": "2024-02-06T04:09:15Z"
    }
  ]
}

Exchange Endpoints

Available Methods Quick Reference

Method NameDescription
placeMarketOrderExecute a market order (filled immediately at current price)
placeLimitOrderExecute a limit order (filled when price reaches specified level)
placeStopOrderExecute a stop order (triggered when price reaches stop level)
getPositionsGet all open positions
getBalanceGet account balance
getOrdersGet all open orders
cancelOrderCancel a specific order
cancelAllOrdersCancel all orders (optionally for specific symbol)
setLeverageSet leverage for a specific symbol
setHedgeModeSet hedge mode (one-way or two-way trading)
closeAllPositionsClose all open positions
getTickersGet ticker information
getBestBidAskGet best bid/ask prices for a symbol
getUserTradeHistoryGet user's trade history
createWithdrawalCreate a withdrawal request
getDepositAddressGet deposit address for a currency

See method-details endpoint below for complete parameter documentation for each method.

health-check

GET/api/v1/exchanges

Example Response:

{
  "success": true,
  "status": "ok",
  "supportedExchanges": [
    "aevo",
    "apex",
    "ascendex",
    "asterdex",
    "binance",
    "bingx",
    "bitget",
    "bitmart",
    "bitmex",
    "bitrue",
    "blofin",
    "bulktrade",
    "bybit",
    "coinbase",
    "dydx",
    "extended",
    "flash",
    "grvt",
    "hyperliquid",
    "kucoin",
    "lighter",
    "mexc",
    "okx",
    "orderly",
    "ostium",
    "pacifica",
    "paradex",
    "phemex",
    "propr",
    "reya",
    "standx",
    "variational",
    "vest",
    "woox"
  ],
  "code": 200
}

get-best-bid-ask

GET/api/v1/exchanges

Parameters:

method (string)*

Method name (must be 'getBestBidAsk')

exchange (string)*

Exchange name (e.g., binance, bybit, okx, phemex)

symbol (string)*

Trading symbol (e.g., BTCUSDT)

apiKey (string)*

Exchange API key

apiSecret (string)*

Exchange API secret

passphrase (string)

API passphrase (for exchanges like OKX)

userWalletAddress (string)

User wallet address (required for orderly exchange)

Example Response:

{
  "success": true,
  "bid": 43250.5,
  "ask": 43251,
  "spread": 0.5,
  "exchange": "binance"
}

available-methods

GET/api/v1/exchanges

Parameters:

list-methods (string)*

Set to 'true' to get list of all available methods

Example Response:

{
  "success": true,
  "methods": [
    {
      "name": "placeMarketOrder",
      "description": "Execute a market order (filled immediately at current price)"
    },
    {
      "name": "placeLimitOrder",
      "description": "Execute a limit order (filled when price reaches specified level)"
    },
    {
      "name": "placeStopOrder",
      "description": "Execute a stop order (triggered when price reaches stop level)"
    },
    {
      "name": "getPositions",
      "description": "Get all open positions"
    },
    {
      "name": "getBalance",
      "description": "Get account balance"
    },
    {
      "name": "getOrders",
      "description": "Get all open orders"
    },
    {
      "name": "cancelOrder",
      "description": "Cancel a specific order"
    },
    {
      "name": "cancelAllOrders",
      "description": "Cancel all orders (optionally for specific symbol)"
    },
    {
      "name": "setLeverage",
      "description": "Set leverage for a specific symbol"
    },
    {
      "name": "setHedgeMode",
      "description": "Set hedge mode (one-way or two-way trading)"
    },
    {
      "name": "closeAllPositions",
      "description": "Close all open positions"
    },
    {
      "name": "getTickers",
      "description": "Get ticker information"
    },
    {
      "name": "getBestBidAsk",
      "description": "Get best bid/ask prices for a symbol"
    },
    {
      "name": "getUserTradeHistory",
      "description": "Get user's trade history"
    },
    {
      "name": "createWithdrawal",
      "description": "Create a withdrawal request"
    },
    {
      "name": "getDepositAddress",
      "description": "Get deposit address for a currency"
    }
  ],
  "code": 200
}

method-details

POST/api/v1/exchanges

Parameters:

exchangeName (string)*

Exchange name (e.g., binance, bybit, okx, phemex, orderly)

method (string)*

Method to execute. Available: placeMarketOrder, placeLimitOrder, placeStopOrder, getPositions, getBalance, getOrders, cancelOrder, cancelAllOrders, setLeverage, setHedgeMode, closeAllPositions, getTickers, getBestBidAsk, getUserTradeHistory, createWithdrawal, getDepositAddress

credentials (object)*

API credentials object. Fields: apiKey (string, required), apiSecret (string, required), passphrase (string, optional — broker ID for Orderly, passphrase for OKX). For Orderly: apiKey = trading wallet public key (ed25519, raw — no prefix), apiSecret = trading wallet private key (ed25519 hex). The walletAddress (main wallet) is auto-injected from auth.

Example Response:

{
  "success": true,
  "code": 200,
  "data": {},
  "exchange": "binance"
}

Method Details and Parameters

placeMarketOrder

Execute a market order (filled immediately at current price)

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

side (string)*

Order side: 'buy' or 'sell'

quantity (number)*

Order quantity

positionSide (string)

Position side: 'long' or 'short' (optional)

reduceOnly (boolean)

Reduce existing position only (optional)

Example Parameters:
{
  "symbol": "BTCUSDT",
  "side": "buy",
  "quantity": 0.01,
  "positionSide": "long"
}
Example Response:
{
  "success": true,
  "data": {
    "orderId": "1234567890",
    "symbol": "BTCUSDT",
    "side": "buy",
    "positionSide": "long",
    "type": "market",
    "price": "97450.50",
    "quantity": 0.01,
    "status": "filled",
    "filledQuantity": 0.01,
    "avgFilledPrice": "97450.50",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "binance"
}
placeLimitOrder

Execute a limit order (filled when price reaches specified level)

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

side (string)*

Order side: 'buy' or 'sell'

quantity (number)*

Order quantity

price (number)*

Limit price

positionSide (string)

Position side: 'long' or 'short' (optional)

reduceOnly (boolean)

Reduce existing position only (optional)

Example Parameters:
{
  "symbol": "BTCUSDT",
  "side": "buy",
  "quantity": 0.01,
  "price": 42500,
  "positionSide": "long"
}
Example Response:
{
  "success": true,
  "data": {
    "orderId": "1234567890",
    "symbol": "BTCUSDT",
    "side": "buy",
    "positionSide": "long",
    "type": "limit",
    "price": 95000,
    "quantity": 0.001,
    "status": "new",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "phemex"
}
placeStopOrder

Execute a stop order (triggered when price reaches stop level)

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

side (string)*

Order side: 'buy' or 'sell'

quantity (number)*

Order quantity

stopPrice (number)*

Stop trigger price

positionSide (string)

Position side: 'long' or 'short' (optional)

reduceOnly (boolean)

Reduce existing position only (optional)

Example Parameters:
{
  "symbol": "BTCUSDT",
  "side": "sell",
  "quantity": 0.01,
  "stopPrice": 42000,
  "positionSide": "long"
}
Example Response:
{
  "success": true,
  "data": {
    "orderId": "1234567891",
    "symbol": "BTCUSDT",
    "side": "sell",
    "positionSide": "long",
    "type": "stop",
    "stopPrice": 42000,
    "quantity": 0.01,
    "status": "triggered",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "binance"
}
getPositions

Get all open positions

Example Response:
{
  "success": true,
  "data": [
    {
      "symbol": "BTCUSDT",
      "side": "buy",
      "positionSide": "long",
      "size": 0.001,
      "entryPrice": 95000,
      "markPrice": 97500,
      "pnl": 2.5,
      "leverage": 10,
      "liquidationPrice": 86500,
      "marginType": "cross",
      "unrealizedPnl": 25,
      "notional": 95
    }
  ],
  "code": 200,
  "exchange": "phemex"
}
getBalance

Get account balance

Example Response:
{
  "success": true,
  "data": [
    {
      "asset": "USDT",
      "balance": "1000.00",
      "available": "950.00",
      "locked": "50.00"
    },
    {
      "asset": "BTC",
      "balance": "0.05",
      "available": "0.05",
      "locked": "0"
    }
  ],
  "code": 200,
  "exchange": "binance"
}
getOrders

Get all open orders

Example Response:
{
  "success": true,
  "data": [
    {
      "orderId": "1234567890",
      "symbol": "BTCUSDT",
      "side": "buy",
      "positionSide": "long",
      "type": "limit",
      "price": "95000",
      "quantity": 0.001,
      "filledQuantity": 0,
      "status": "open",
      "timestamp": 1738435234567
    }
  ],
  "code": 200,
  "exchange": "binance"
}
cancelOrder

Cancel a specific order

Parameters:
orderID (string)*

Order ID to cancel

symbol (string)*

Trading symbol (e.g., BTCUSDT)

Example Parameters:
{
  "orderID": "123456",
  "symbol": "BTCUSDT"
}
Example Response:
{
  "success": true,
  "data": {
    "orderId": "123456",
    "symbol": "BTCUSDT",
    "status": "canceled",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "bybit"
}
cancelAllOrders

Cancel all orders (optionally for specific symbol)

Parameters:
symbol (string)

Trading symbol (optional - if not provided, cancels all orders)

Example Parameters:
{
  "symbol": "BTCUSDT"
}
Example Response:
{
  "success": true,
  "data": {
    "canceledOrders": [
      {
        "orderId": "123456",
        "symbol": "BTCUSDT",
        "status": "canceled"
      },
      {
        "orderId": "123457",
        "symbol": "BTCUSDT",
        "status": "canceled"
      }
    ],
    "totalCanceled": 2
  },
  "code": 200,
  "exchange": "binance"
}
setLeverage

Set leverage for a specific symbol

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

leverage (number)*

Leverage multiplier (e.g., 10 for 10x)

isIsolated (boolean)

Set isolated margin mode (optional)

isHedged (boolean)

Set hedge mode (optional)

Example Parameters:
{
  "symbol": "BTCUSDT",
  "leverage": 10,
  "isIsolated": false
}
Example Response:
{
  "success": true,
  "data": {
    "symbol": "BTCUSDT",
    "leverage": 10,
    "marginMode": "cross",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "binance"
}
setHedgeMode

Set hedge mode (one-way or two-way trading)

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

isHedged (boolean)*

Enable hedge mode (true = two-way, false = one-way)

Example Parameters:
{
  "symbol": "BTCUSDT",
  "isHedged": true
}
Example Response:
{
  "success": true,
  "data": {
    "symbol": "BTCUSDT",
    "hedgeMode": true,
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "bybit"
}
closeAllPositions

Close all open positions

Example Response:
{
  "success": true,
  "data": {
    "closedPositions": [
      {
        "symbol": "BTCUSDT",
        "side": "buy",
        "positionSide": "long",
        "closedSize": 0.001,
        "realizedPnl": 2.5,
        "closePrice": 97500
      }
    ],
    "totalClosed": 1,
    "totalRealizedPnl": 2.5
  },
  "code": 200,
  "exchange": "phemex"
}
getTickers

Get ticker information

Example Response:
{
  "success": true,
  "data": [
    {
      "symbol": "BTCUSDT",
      "lastPrice": "97500.00",
      "bidPrice": "97495.00",
      "askPrice": "97505.00",
      "priceChange": "2500.00",
      "priceChangePercent": "2.63",
      "highPrice": "98500.00",
      "lowPrice": "94500.00",
      "volume": "50000",
      "quoteVolume": "4850000000",
      "timestamp": 1738435234567
    },
    {
      "symbol": "ETHUSDT",
      "lastPrice": "2650.75",
      "bidPrice": "2650.50",
      "askPrice": "2651.00",
      "priceChange": "-25.25",
      "priceChangePercent": "-0.94",
      "highPrice": "2700.00",
      "lowPrice": "2600.00",
      "volume": "150000",
      "quoteVolume": "397500000",
      "timestamp": 1738435234567
    }
  ],
  "code": 200,
  "exchange": "binance"
}
getBestBidAsk

Get best bid/ask prices for a symbol

Parameters:
symbol (string)*

Trading symbol (e.g., BTCUSDT)

Example Parameters:
{
  "symbol": "BTCUSDT"
}
Example Response:
{
  "success": true,
  "data": {
    "bestBid": {
      "price": "97495.00",
      "quantity": 1.5
    },
    "bestAsk": {
      "price": "97505.00",
      "quantity": 2.3
    },
    "spread": 10,
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "phemex"
}
createWithdrawal

Create a withdrawal request

Parameters:
currency (string)*

Currency to withdraw (e.g., USDT)

address (string)*

Destination wallet address

amount (string)*

Amount to withdraw

chainName (string)*

Blockchain network (e.g., ETH, SOL)

addressTag (string)

Address tag/memo (optional)

Example Parameters:
{
  "currency": "USDT",
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "amount": "100",
  "chainName": "ETH"
}
Example Response:
{
  "success": true,
  "data": {
    "withdrawalId": "wd_abc123",
    "currency": "USDT",
    "amount": "100",
    "address": "0x1234567890abcdef1234567890abcdef12345678",
    "chainName": "ETH",
    "status": "pending",
    "timestamp": 1738435234567
  },
  "code": 200,
  "exchange": "binance"
}
getDepositAddress

Get deposit address for a currency

Parameters:
currency (string)*

Currency to deposit (e.g., USDT)

chainName (string)*

Blockchain network (e.g., ETH, SOL)

Example Parameters:
{
  "currency": "USDT",
  "chainName": "ETH"
}
Example Response:
{
  "success": true,
  "data": {
    "currency": "USDT",
    "address": "0xabcdef1234567890abcdef1234567890abcdef12",
    "chainName": "ETH",
    "tag": null,
    "memo": null
  },
  "code": 200,
  "exchange": "binance"
}
getUserTradeHistory

Get user's trade history

Parameters:
limit (number)

Maximum number of trades to return (default: 1000)

Example Parameters:
{
  "limit": 100
}
Example Response:
{
  "success": true,
  "data": [
    {
      "tradeId": "trade_001",
      "symbol": "BTCUSDT",
      "side": "buy",
      "quantity": 0.01,
      "price": "97450.50",
      "total": "974.51",
      "fee": "0.97",
      "timestamp": 1738435234567,
      "orderId": "1234567890"
    },
    {
      "tradeId": "trade_002",
      "symbol": "ETHUSDT",
      "side": "sell",
      "quantity": 0.5,
      "price": "2650.75",
      "total": "1325.38",
      "fee": "1.33",
      "timestamp": 1738435200000,
      "orderId": "1234567891"
    }
  ],
  "total": 2,
  "code": 200,
  "exchange": "bybit"
}

Jupiter Protocol Endpoints

info

GETPOST/api/jupiter

Parameters:

pair (string)*

Trading pair

Example Response:

{
  "inputMint": "SOL",
  "outputMint": "USDC",
  "bestRoute": {
    "inAmount": 1,
    "outAmount": 101.52,
    "priceImpact": 0.1
  }
}

submit

POST/api/jupiter/submit

Parameters:

route (object)*

Selected route object

userPublicKey (string)*

User's public key

Example Response:

{
  "signature": "5KtPn3...",
  "status": "confirmed",
  "timestamp": "2024-02-06T04:03:46Z"
}

swap

POST/api/jupiter/swap

Parameters:

inputMint (string)*

Input token mint address

outputMint (string)*

Output token mint address

amount (number)*

Amount to swap

slippage (number)*

Maximum slippage percentage

Example Response:

{
  "txId": "4zJg7...",
  "inputAmount": 1,
  "outputAmount": 101.52,
  "executedPrice": 101.52
}

Market Data Endpoints

tickers

GETPOST/api/v1/markets/hybrid-tickers

Parameters:

type (string)

Market type filter: 'futures' or 'spot'

minimumVolume (number)

Minimum 24h quote volume in USD

up (number)

Filter markets up by at least X% (e.g., up=10 for markets up 10%+)

down (number)

Filter markets down by at least X% (e.g., down=10 for markets down 10%+)

minimumPrice (number)

Minimum asset price filter

maximumPrice (number)

Maximum asset price filter

exchange (string)

Filter by exchange (e.g., binance, bybit, okx)

spotPolling (string)

Enable spot polling ('true' or 'false')

health (boolean)

Health check mode — returns cache status

Example Response:

{
  "success": true,
  "data": {
    "spot": {
      "data": [
        {
          "symbol": "BTCUSDT",
          "lastPrice": "97450.50",
          "priceChangePercent": "2.45",
          "quoteVolume": "1250000000.00",
          "source": "binance",
          "sources": [
            "binance",
            "bybit"
          ]
        }
      ]
    },
    "futures": {
      "data": [
        {
          "symbol": "ETHUSDT",
          "lastPrice": "3650.75",
          "priceChangePercent": "-1.25",
          "quoteVolume": "850000000.00",
          "source": "bybit",
          "sources": [
            "bybit"
          ]
        }
      ]
    }
  },
  "cached": {
    "spot": true,
    "futures": true
  },
  "timestamp": 1742345678901
}

calendar

GETPOST/api/v1/markets/calendar

Parameters:

country (string)

Filter by country code (e.g., US, GB, JP)

impact (string)

Filter by impact level: 'Low', 'Medium', or 'High'

search (string)

Search event names (case-insensitive)

from (string)

Start date for date range filter

to (string)

End date for date range filter

Example Response:

{
  "success": true,
  "data": {
    "events": [
      {
        "date": "2026-03-26T14:30:00.000Z",
        "country": "US",
        "event": "Non-Farm Payrolls",
        "currency": "USD",
        "previous": 175000,
        "estimate": 180000,
        "actual": 185000,
        "change": 10000,
        "impact": "High",
        "changePercentage": 5.71
      }
    ],
    "fromCache": true
  }
}

funding-rates

GET/api/v1/markets/funding-rates

Parameters:

symbol (string)

Filter by trading pair symbol (case-insensitive, e.g., BTCUSDT)

Example Response:

{
  "success": true,
  "data": [
    {
      "symbol": "BTCUSDT",
      "exchange": "binance",
      "fundingRate": "0.00012",
      "nextFundingTime": 1742348400000
    },
    {
      "symbol": "BTCUSDT",
      "exchange": "bybit",
      "fundingRate": "0.00015",
      "nextFundingTime": 1742348400000
    }
  ],
  "cached": true,
  "timestamp": 1742345678901
}

open-interest

GETPOSTPATCH/api/v1/markets/open-interest

Example Response:

{
  "success": true,
  "data": [
    {
      "symbol": "BTCUSDT",
      "openInterest": "52431.250",
      "openInterestUsd": 5112345678.5,
      "price": 97500.2,
      "volumeUsd": 2345678901.5,
      "timestamp": 1742345678901
    },
    {
      "symbol": "ETHUSDT",
      "openInterest": "1234567.890",
      "openInterestUsd": 4506789012.3,
      "price": 3650.75,
      "volumeUsd": 1234567890.1,
      "timestamp": 1742345678901
    }
  ],
  "timestamp": 1742345678901,
  "marketsCount": 5
}

listings

GETPOST/api/v1/markets/listings

Parameters:

tickers (array)*

Array of processed ticker data to compare against known symbols (POST only)

Example Response:

{
  "success": true,
  "data": {
    "newListings": [
      {
        "symbol": "NEWTOKEN",
        "lastPrice": "1.25",
        "priceChangePercent": "150.00",
        "quoteVolume": "5000000.00"
      }
    ],
    "totalCount": 1542,
    "previousCount": 1541
  }
}

insights

GETPOST/api/v1/markets/insights

Parameters:

query (string)*

Search query for market insights (e.g., 'top AI tokens', 'DeFi movers')

type (string)

Analysis type: 'summary' (default), 'analysis', or 'report'

limit (number)

Number of tickers to return (default: 10)

Example Response:

{
  "success": true,
  "data": {
    "query": "top AI tokens by volume",
    "insights": "AI-related tokens are seeing elevated volume with RENDER leading at $450M in 24h volume...",
    "tickers": [
      {
        "symbol": "RENDERUSDT",
        "lastPrice": "8.45",
        "priceChangePercent": "12.3",
        "quoteVolume": "450000000.00",
        "description": "Leading AI/GPU rendering network"
      }
    ],
    "timestamp": 1742345678901
  }
}

news

GETPOST/api/v1/markets/news

Example Response:

{
  "success": true,
  "items": [
    {
      "title": "Bitcoin Surges Past $97K on ETF Inflows",
      "url": "https://example.com/article",
      "time_published": "20260326T143000",
      "summary": "Spot Bitcoin ETFs recorded $1.2B in net inflows, pushing BTC to new highs...",
      "source": "Reuters",
      "impact_score": 85,
      "sentiment": "Positive"
    }
  ],
  "timestamp": 1742345678901
}

quakes

GETPOST/api/v1/markets/quakes

Example Response:

{
  "success": true,
  "data": {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "properties": {
          "mag": 6.2,
          "place": "45km NE of Hualien City, Taiwan",
          "time": 1742340000000,
          "title": "M 6.2 - 45km NE of Hualien City, Taiwan",
          "alert": "yellow"
        }
      }
    ]
  },
  "timestamp": 1742345678901
}

volume-snapshot

GET/api/v1/markets/volume-snapshot

Example Response:

{
  "success": true,
  "data": [
    {
      "exchange": "binance",
      "spotVolume": 12500000000,
      "futuresVolume": 45000000000,
      "totalVolume": 57500000000,
      "marketShare": 42.5
    },
    {
      "exchange": "bybit",
      "spotVolume": 3200000000,
      "futuresVolume": 18000000000,
      "totalVolume": 21200000000,
      "marketShare": 15.7
    }
  ],
  "cached": true,
  "timestamp": 1742345678901
}

swap-volume

GETPOSTPATCH/api/v1/markets/swap-volume

Parameters:

volume (number)

Daily volume to store (POST only, auto-fetched if omitted)

date (string)

Date in YYYY-MM-DD format (POST only, defaults to today)

Example Response:

{
  "success": true,
  "data": [
    {
      "date": "2026-03-26",
      "volume": 135200000000,
      "timestamp": 1742345678901
    },
    {
      "date": "2026-03-25",
      "volume": 128700000000,
      "timestamp": 1742259278901
    }
  ]
}

ttc-scanner

GET/api/v1/markets/ttc-scanner

Parameters:

symbol (string)*

Market symbol (e.g., BTCUSDT)

timeframe (string)

Kline interval (default: '1h'). e.g., 1h, 4h, 1d

bars (number)

Number of bars to analyze (default: 1000, max: 1000)

swingStrength (number)

Swing detection lookback period (default: 10)

Example Response:

{
  "success": true,
  "timestamp": 1742345678901,
  "params": {
    "symbol": "BTCUSDT",
    "timeframe": "1h",
    "bars": 1000,
    "swingStrength": 10
  },
  "data": {
    "symbol": "BTCUSDT",
    "price": 97450.5,
    "scans": [
      {
        "pivotType": "high",
        "pivotPrice": 98200,
        "pivotTime": 1742300000000,
        "lines": []
      }
    ],
    "scoring": {
      "bullish": 65,
      "bearish": 35,
      "composite": 65
    },
    "signal": {
      "direction": "LONG",
      "strength": 72,
      "confidence": "MEDIUM",
      "entry": 97450.5,
      "stopLoss": 96200,
      "takeProfit1": 98500,
      "takeProfit2": 99800,
      "takeProfit3": 101500,
      "riskRewardRatio": 2.4,
      "reasoning": "Price holding above quadrant support zone at 1x1 line from recent swing low"
    }
  }
}