●PUBLIC BETASEPOLIA TESTNET · NO REAL FUNDS · NOT PRODUCTION CUSTODYLearn more →
Vela

HTTP Endpoints

Base URL: https://vela-engine.fly.dev

Health

GET /health

Returns engine status. No authentication required.

Response 200:
{ "ok": true }

Markets

GET /markets

Returns all active markets with best bid, best ask, and spread. No authentication required.

Response 200:
{
  "ok": true,
  "data": [
    {
      "id": "ETH-USDC",
      "base": "ETH",
      "quote": "USDC",
      "best_bid": "3200.000000",
      "best_ask": "3201.600000",
      "spread": "1.600000",
      "spread_bps": "4.99"
    }
  ]
}

GET /markets/:market/book

Returns the full order book for a market (up to 50 levels per side). No authentication required.

Params: market = "ETH-USDC"

Response 200:
{
  "ok": true,
  "data": {
    "market": "ETH-USDC",
    "bids": [["3200.000000", "1.500000"], ["3199.000000", "3.200000"]],
    "asks": [["3201.600000", "2.000000"], ["3202.000000", "0.800000"]]
  }
}

Account

GET /account/:address/balances

Returns balances for a wallet address.

Response 200:
{
  "ok": true,
  "data": [
    { "asset": "USDC", "available": "10000.000000", "locked": "500.000000" }
  ]
}

GET /account/:address/orders

Returns all open orders for a wallet address.

Response 200:
{
  "ok": true,
  "data": [
    {
      "id": "ord_abc123",
      "market": "ETH-USDC",
      "side": "bid",
      "price": "3200.000000",
      "quantity": "1.000000",
      "filled": "0.000000",
      "status": "open",
      "order_type": "limit",
      "time_in_force": "gtc",
      "created_at": 1734567890
    }
  ]
}

Orders

POST /orders

Place a new order. Requires a valid ECDSA signature.

Request body:
{
  "market_id": "ETH-USDC",
  "side": "bid",
  "price": "3200000000",
  "quantity": "1000000",
  "order_type": "limit",
  "time_in_force": "gtc",
  "user": "0xAbCd...1234",
  "nonce": 42,
  "signature": "0x..."
}

Response 200:
{
  "ok": true,
  "data": { "order_id": "ord_abc123", "status": "open" }
}

POST /orders/cancel

Cancel an open order. Requires an ECDSA signature.

Request body:
{
  "order_id": "ord_abc123",
  "user": "0xAbCd...1234",
  "nonce": 43,
  "signature": "0x..."
}

Response 200:
{ "ok": true }

Withdrawals

POST /withdrawals

Initiate a withdrawal. Requires an ECDSA signature.

Request body:
{
  "asset": "USDC",
  "amount": "1000000000",
  "user": "0xAbCd...1234",
  "nonce": 44,
  "signature": "0x..."
}

Response 200:
{ "ok": true, "data": { "withdrawal_id": "wdl_xyz789" } }
All prices and quantities in request bodies are integers scaled by 1,000,000. A price of $3,200.00 is encoded as 3200000000. A quantity of 1.5 ETH is encoded as 1500000.