Skip to main content

Orderbook

Retrieve the orderbook data for a specific symbol.

Endpoint

GET /orderbook

Parameters

ParameterTypeRequiredDescription
symbol_namestringYesThe trading pair symbol (e.g., BTC_USDT).

Response

JSON Object


Response Fields

FieldTypeDescription
istringThe version of the orderbook.
sstringSymbol name (e.g., ETH_USDT).
barrayList of bid prices. Each price at index x corresponds to the size at the same index in d.
darrayList of bid sizes corresponding to the bid prices in b.
aarrayList of ask prices. Each price at index x corresponds to the size at the same index in c.
carrayList of ask sizes corresponding to the ask prices in a.

Example Usage

curl --location 'https://spot-markets.goonus.io/orderbook?symbol_name=BTC_USDT'

Response Example

{
"i": "7",
"s": "ETH_USDT",
"b": ["1.0000000"],
"d": ["0.170"],
"a": ["4.0000000", "5.0000000"],
"c": ["0.010", "0.130"]
}

note
  • Orderbook Data: Includes lists of bid/ask prices and their corresponding sizes.
  • Mapping: Each price in b (bids) corresponds to the size at the same index in d, and each price in a (asks) corresponds to the size at the same index in c.