LogoLogo
Launch App
  • Standard
    • Thesis
    • Core Contributors
    • Sigma
    • $STND
    • Tokenomics
    • DeFi 3.0
  • Apps
    • Spot
      • For Traders
        • Market
        • Order Type
      • For Developers
        • REST API
        • Websocket Streams
          • Connect
          • Trades
          • Orders
          • Orderhistories
          • Prices
          • Orderbook
      • For Projects
        • Listing
        • Launchpad
        • Terminal
        • Market Making
    • Vaults
  • Standard L3
    • What is Standard L3?
      • How Standard L3 works
      • Modular Architecture
      • Bridge
Powered by GitBook
On this page
  • Stream order blocks in certain orderbooks in Standard spot exchange
  • ✅ Request
  • 📤 Response
  • 📡 Streamed Data Format
  • 📄 Field Descriptions

Was this helpful?

  1. Apps
  2. Spot
  3. For Developers
  4. Websocket Streams

Orderbook

Stream order blocks in certain orderbooks in Standard spot exchange

✅ Request

Subscription
{
  "id": 1,
  "method": "spot.orderbook.subscribe.pairs",
  "params": {
    "books": [{
      "pair": "ETH/USDC",
      "step": "0.1"
    },
    {
      "pair": "WBTC/USDT",
      "step": "0.01"
    }]
  }
}
Unsubscription
{
  "id": 1,
  "method": "spot.orderbook.unsubscribe.pairs",
  "params": {
    "books": [{
      "pair": "ETH/USDC",
      "step": "0.1",  
    },
    {
      "pair": "WBTC/USDT",
      "step": "0.01"
    }]
  }
}

📤 Response

Success
{
  "result": null,
  "id": 1
}
Error
{
  "code": 1,
  "msg": "Internal Error: {error}"
}

📡 Streamed Data Format

Order Block Stream
[
  "spotOrderBlock" // eventId
  true,            // isBid (buy order)
  3142.75,         // price
  1.5,             // baseVolume (ETH)
  4714.13,         // quoteVolume (USDC)
  2,               // scale
  1713659500       // timestamp
]

📄 Field Descriptions

Index
Field
Type
Description

0`

eventId

string

Unique event identifier

1

isBid

boolean

true for bid, false for ask

2

price

float

Price of the update

3

baseVolume

float

Volume in base token

4

quoteVolume

float

Volume in quote token

5

scale

float

Decimal scale of the price or bucket

6

timestamp

integer

UNIX timestamp of the event (in seconds)

PreviousPricesNextFor Projects

Last updated 25 days ago

Was this helpful?