CollarQuest Metaverse
1.6
Ask or search…
K

CollarSwap API

DRAFT COLLARSWAP DOCS - SUBJECT TO CHANGE WITHOUT NOTICE.
CollarSwap.io General API
You’ll find some of the general requirements from CollarSwap.io to ensure smooth integration and data availability. We provide publicly accessible, no-authentication API endpoints, with reasonable rate limits to ensure tickers/pairs list, market data, orderbook data can be queried on a minute basis. Data is available in JSON format. A whitelist IP address may be granted to connecting partners where necessary. Spot Exchanges - Endpoints Overview CollarSwap offers the following 4 separate endpoints:
No.
Endpoint
Description
1
/pairs
Details on crypto assets traded
2
/tickers
Market related statistics for all markets for the last 24 hours.
3
/orderbook
Order book depth of any given trading pair, split into two different arrays for bid and ask orders.
4
/historical
Historical trade data for any given trading pair.
Endpoint 1 - /pairs
The /pairs endpoint provides a summary of cryptoasset trading pairs available on the exchange. For example, for Dog Collar (COLLAR):
{ “ticker_id”: “COLLAR_ETH”, "base": "COLLAR", "target": "ETH", } /pairs endpoint response description:
Name
Data Type
Category
Description
ticker_id
string
Mandatory
Identifier of a ticker with delimiter to separate base/target, eg. COLLAR_ETH
base
string
Mandatory
Symbol/currency code of a the base cryptoasset, eg. COLLAR
Target
string
Mandatory
Symbol/currency code of the target cryptoasset, eg. ETH
pool_id
string
Recommended/Mandatory
pool/pair address or unique ID (Mandatory for DEX)
Endpoint 2 - /tickers (Market Info)
The /tickers endpoint provides 24-hour pricing and volume information on each market pair available on an exchange.
{ "ticker_id": "COLLAR_ETH", "base_currency": "COLLAR", "target_currency": "ETH", "last_price":"50.0", "base_volume":"10", "target_volume":"500", "bid":"49.9", "ask":"50.1", "high":”51.3”, “low”:”49.2”, }
/tickers endpoint response description:
Name
Data Type
Category
Description
ticker_id
string
Mandatory
Identifier of a ticker with delimiter to separate base/target, eg. COLLAR_ETH
base_currency
string
Mandatory
Symbol/currency code of base pair, eg. COLLAR
target_currency
string
Mandatory
Symbol/currency code of target pair, eg. ETH
last_price
decimal
Mandatory
Last transacted price of base currency based on given target currency (unit in base or target)
eg. X = ? 1 base = X target X base = 1 target
base_volume
decimal
Mandatory
24 hour trading volume in base pair volume (unit in base)
target_volume
decimal
Mandatory
24 hour trading volume in target pair volume (unit in target)
pool_id
string
Recommended/Mandatory
pool/pair address or unique ID (Mandatory for DEX)
bid
decimal
Recommended
Current highest bid price
ask
decimal
Recommended
Current lowest ask price
high
decimal
Recommended
Rolling 24-hours highest transaction price
low
decimal
Recommended
Rolling 24-hours lowest transaction price
Reference: (Nov 21, 2022 will be added soon) Endpoint 3 - /orderbook (Order book depth details)
The /orderbook/ticker_id endpoint is to provide order book information with at least depth = 100 (50 each side) returned for a given market pair/ticker.
Endpoint parameters:
Name
Data Type
Category
Description
ticker_id
String
Mandatory
A ticker such as "COLLAR_ETH", with delimiter between different cryptoassets
depth
integer
Recommended
Orders depth quantity: [0, 100, 200, 500...]. 0 returns full depth. Depth = 100 means 50 for each bid/ask side.
Note that for more liquid or closely priced pairs, the lack of order depth may result in a miscalculation of depth/spread.
Example query: .../api/orderbook?ticker_id=COLLAR_ETH&depth=200
{ "ticker_id": "COLLAR_ETH", "timestamp":"1700050000", "bids":[ [ "49.8", "0.50000000" ], [ "49.9", "6.40000000" ] ], "asks":[ [ "50.1", "9.20000000" ], [ "50.2", "7.9000000" ] ] } Order book response descriptions:
Name
Data Type
Category
Description
ticker_id
String
Mandatory
A pair such as "COLLAR_ETH", with delimiter between different cryptoassets
timestamp
timestamp
Recommended
Unix timestamp in milliseconds for when the last updated time occurred.
bids
decimal
Mandatory
An array containing 2 elements. The offer price and quantity for each bid order
asks
decimal
Mandatory
An array containing 2 elements. The ask price and quantity for each ask order
Reference: (Nov 21, 2022 will be added soon)