OX.FUN
TradeSupport
  • 🏠OX.FUN
  • OX.FUN DOCS
    • 📈Perps
    • 📊Strategies
    • 🐂OX Coin
    • 🍂Seasons
    • 📩Referral
  • Page
  • API
    • ⚙️OX FUN API
    • 🔑API Key Management
    • ☁️Websocket API
      • Authentication
      • Session Keep Alive
      • Order Commands
        • Place Limit Order
        • Place Market Order
        • Place Stop Limit Order
        • Place Stop Market Order
        • Place Batch Market Order
        • Cancel Order
        • Cancel Batch Order
        • Modify Order
        • Modify Batch Orders
      • Subscriptions - Private
        • Balance Channel
        • Position Channel
        • Order Channel
          • Order Opened
          • Order Closed
          • Order Closed Failure
          • Order Modified
          • Order Modified Failure
          • Order Matched
      • Subscriptions - Public
        • Fixed Size Order Book
        • Full Order Book
        • Incremental Order Book
        • Best Bid/Ask
        • Trade
        • Ticker
        • Candles
        • Liquidation RFQ
        • Market
      • Other Responses
      • Error Codes
        • Curl Error Codes
    • 🔌REST API V3
      • Account & Wallet - Private
      • Deposits & Withdrawals - Private
      • Market Data - Public
      • Orders - Private
      • Trades - Private
  • 🔗External
    • 💧Aerodrome Pool
    • 🔵Trade on Uniswap (Base)
    • Trade on Solana
    • 🦎CoinGecko
    • API Code Examples
  • 🔗SOCIALS
    • 🐂OX.FUN
    • Discord
    • Twitter
Powered by GitBook
On this page
  1. API
  2. Websocket API
  3. Subscriptions - Public

Trade

Channel Update Frequency: real-time, with every order matched event

This trade channel sends public trade information whenever an order is matched on the order book.

Curl

Request format

{
  "op": "subscribe",
  "tag": 1,
  "args": ["trade:BTC-USD-SWAP-LIN"]
}

Success response format

{
  "event": "subscribe", 
  "channel": ["trade:BTC-USD-SWAP-LIN"], 
  "success": True, 
  "tag": "1", 
  "timestamp": "1594299886880"
}

Trade channel format

{
  "table": "trade",
  "data": [ {
              "side": "buy",
              "tradeId": "2778148208082945",
              "price": "5556.91",
              "quantity": "5",
              "matchType": "MAKER",
              "marketCode": "BTC-USD-SWAP-LIN",
              "timestamp": "1594299886890"
            } ]
}

Request Parameters

Parameters
Type
Required
Description

op

STRING

Yes

subscribe

tag

INTEGER or STRING

No

If given it will be echoed in the reply and the max size of tag is 32

args

LIST

Yes

list of individual markets trade:<marketCode>

Channel Update Fields

Fields
Type
Description

table

STRING

trade

data

LIST of dictionary

tradeId

STRING

Transaction Id

price

STRING

Matched price

quantity

STRING

Matched quantity

matchType

STRING

TAKER or MAKER, orders that match via the implied mechanism show as MAKERs in their respective markets

side

STRING

Matched side

timestamp

STRING

Matched timestamp

marketCode

STRING

Market code

PreviousBest Bid/AskNextTicker

Last updated 6 months ago

☁️