Octopus - Market API
Websocket Pair Feed
Get WSS streams for pairs real time market data & trades.
This endpoint is only available to Growth and Enterprise plans.
Endpoint details
- URL: wss://general-api-wss-fgpupeioaa-uc.a.run.app
- Message (string):
{
"type": "pair",
"authorization": "YOUR-API-KEY",
"payload": {
"address": "0x059fd118aa8988f5e97b66fcd489765111e069c9",
"blockchain": "1"
}
}
Parameters:
address
: the address of the pairblockchain
: the blockchain of the pair (blockchain ID or name)asset
: you can also query via the asset pattern (asset name or contract) instead of the address - it will use the largest trading pair of the asset (by volume & liquidity)
Data model
Data reponses includes:
- Pairs updates:
{
data: {
price: number,
priceUSD: number,
pair: string,
}
}
- Trades updates:
{
{
blockchain: string,
date: number // timestamp MS,
hash: string,
token_amount: number,
token_amount_usd: number,
token_price: number,
token_price_vs: number,
type: 'buy' | 'sell',
}
}