Featured Endpoints¶
Below you'll find a selection of the most powerful endpoints in OmniBit API. Each endpoint is presented with its purpose, path parameters, and example requests/responses.
Ticker Snapshot (Single Pair)¶
/v1/marketdata/snapshot/{baseTokenId}/{targetTokenId}
/v1/marketdata/snapshot/symbols/{baseSymbol}/{targetSymbol}
Purpose:
Retrieves a "snapshot" of the current top of book order book data (best bid, best ask, last price, volume) across multiple exchanges for one trading pair.
Path Parameters (by Token IDs):
Name | Type | Mandatory | Description |
---|---|---|---|
baseTokenId | number | Yes | Token ID of the base token. |
targetTokenId | number | Yes | Token ID of the target token. |
Path Parameters (by Symbols):
Name | Type | Mandatory | Description |
---|---|---|---|
baseSymbol | string | Yes | Symbol of the base token. |
targetSymbol | string | Yes | Symbol of the target token. |
Example Requests
Example Response
{
"data": [
{
"exchange": "GATE", // Exchange name
"bestAsk": 2084.01, // Lowest sell price
"bestAskSize": 7.3457, // Size available at best ask
"bestBid": 2084, // Highest buy price
"bestBidSize": 3.7625, // Size available at best bid
"lastPrice": 2085.09, // Most recently traded price on this exchange
"volume": 415183 // Trading volume (typically over last 24 hours)
},
{
"exchange": "HUOBI",
"bestAsk": 2084.77,
"bestAskSize": 1.9447,
"bestBid": 2084.76,
"bestBidSize": 0.0267,
"lastPrice": 2084.77,
"volume": 72896
}
// ...
],
"success": true,
"timestamp": 1741062856357,
"requestId": "",
"message": ""
}
Blockchain Transaction Information¶
Purpose: Provides detailed information about a transaction, including fee details, confirmation status, block data, and transfer information.
Path Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
network | string | Yes | Blockchain network identifier (e.g., "ERC20" ). |
transactionId | string | Yes | Unique transaction hash/ID on the blockchain. |
Example Requests
GET /v1/blockchain/transactioninfo/ERC20/0x8f1191513d568aba769063985ace4b2acce621bd90a41a02f7cf956937da9f28
Example Response
{
"data": {
"transactionId": "0x8f1191513d568aba769063985ace4b2acce621bd90a41a02f7cf956937da9f28",
"network": "ERC20",
"fee": 0.0000411846999984,
"feeSymbol": "ETH",
"feeTokenId": 7312,
"status": "CONFIRMED",
"confirmations": 311722,
"blockNumber": 21820786,
"blockHash": "0xbebb9ea682c3d32b0526331cfd419b7f4c07a0e5966896428e0955f24e1f45d3",
"timestamp": 1739246807000,
"transfers": [
{
"fromAddress": "0x294ab63f30c53f970da1d02668ef14ca3d17b6ce",
"toAddress": "0xa902ab3c5bd69198066b1e895eafa85ae409282e",
"amount": 0.0100000002,
"tokenSymbol": "ETH",
"tokenId": 7312,
"contractAddress": "ETHEREUM",
"transferType": "NATIVE"
}
]
},
"success": true,
"timestamp": 1743009263272,
"requestId": "76b45d30-3b03-46a7-9163-f22f301168c0",
"message": "",
"error": null
}
Fetch Advanced Quote¶
Purpose: Provides a detailed quote, including comprehensive deposit, withdrawal, and trading fee calculations across multiple exchanges and blockchain networks.
Request Body:
Name | Type | Mandatory | Description |
---|---|---|---|
side | string | Yes | "BUY" or "SELL" . |
orderType | string | No | "MARKET" , "LIMIT" , or "STOP" . Default: "MARKET" . |
baseAmount | number | Yes* | Amount in base currency (provide either baseAmount or targetAmount ). |
targetAmount | number | Yes* | Amount in target currency (provide either baseAmount or targetAmount ). |
baseSymbol | string | Yes* | Symbol of base currency (e.g., "BTC" ). Provide either symbols or token IDs. |
targetSymbol | string | Yes* | Symbol of target currency (e.g., "USDT" ). Provide either symbols or token IDs. |
baseTokenId | number | Yes* | Token ID of base currency. |
targetTokenId | number | Yes* | Token ID of target currency. |
limitPrice | number | No | Limit price for "LIMIT" orders (optional). |
stopPrice | number | No | Stop price for stop orders. |
sources | array | No | List of exchanges to use (default: ["ALL"] ). |
Note: Provide either symbols or IDs, and either
baseAmount
ortargetAmount
.
Example Request
{
"side": "BUY",
"orderType": "MARKET",
"baseAmount": 10,
"baseSymbol": "SOL",
"targetSymbol": "USDT"
}
Example Response
{
"data": {
"side": "BUY", // "BUY" or "SELL"
"orderType": "MARKET", // "MARKET", "LIMIT", or "STOP"
"baseAmount": 10, // Amount requested in base currency
"targetAmount": 1426.487378, // Calculated target currency amount
"rate": 142.62, // Effective exchange rate
"baseTokenSymbol": "SOL", // Base currency symbol
"targetTokenSymbol": "USDT", // Target currency symbol
"totalFee": 0.004138, // Sum of depositFee and withdrawalFee
"depositFee": 0.002138, // Fee to deposit assets
"withdrawalFee": 0.002, // Fee for asset withdrawal
"chain": "SPL-SPL", // Blockchain used for routing
"sources": ["BINANCE", "OKX"], // Exchanges involved in quote
"status": "QUOTED" // Current quote status
},
"success": true,
"timestamp": 1741499453037,
"requestId": "daf671d5-265a-4184-bd48-f223982fdeea",
"message": "",
"error": null
}
Advanced Quote Response Fields
Name | Description |
---|---|
side | "BUY" or "SELL" . |
orderType | "MARKET" , "LIMIT" , or "STOP" . |
status | "QUOTED" , "EXPIRED" , etc. |
baseAmount | Final base currency amount quoted. |
targetAmount | Final target currency amount calculated. |
rate | Effective exchange rate. |
baseTokenSymbol | Base currency symbol. |
targetTokenSymbol | Target currency symbol. |
baseTokenId | ID of the base currency. |
targetTokenId | ID of the target currency. |
totalFee | Total of deposit, withdrawal, and trading fees. |
depositFee | Fee charged for depositing assets. |
withdrawalFee | Withdrawal fee charged by exchanges. |
chain | Blockchain network utilized (e.g., "ERC20" , "SPL-SPL" ). |
sources | Exchanges utilized for optimal pricing. |