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 - Private
  4. Order Channel

Order Opened

Curl

OrderOpened message format - LIMIT order

{
  "table": "order",
  "data": [ 
      {
          "notice": "OrderOpened",
          "accountId": "<Your account ID>",
          "clientOrderId": "16",
          "orderId" : "123",
          "price": "9600",
          "limitPrice": "9600",
          "quantity": "2",
          "remainQuantity": "2",
          "amount": "0.0",
          "side": "BUY",
          "status": "OPEN",
          "marketCode": "BTC-USD-SWAP-LIN",
          "timeInForce": "MAKER_ONLY",
          "timestamp": "1594943491077",
          "orderType": "LIMIT",
          "isTriggered": "False",
          "displayQuantity": "2"
       }
  ]
}

OrderOpened message format - STOP MARKET order

{
  "table": "order",
  "data": [
      {
          "accountId": "<Your account ID>", 
          "clientOrderId": "1", 
          "orderId": "1000021706785", 
          "price": "12000.0", 
          "quantity": "0.001", 
          "amount": "0.0", 
          "side": "BUY", 
          "status": "OPEN", 
          "marketCode": "BTC-USD-SWAP-LIN", 
          "timeInForce": "IOC", 
          "timestamp": "1680042503604", 
          "remainQuantity": "0.001", 
          "stopPrice": "10000.0", 
          "limitPrice": "12000.0", 
          "notice": "OrderOpened", 
          "orderType": "STOP_MARKET", 
          "isTriggered": "false", 
          "triggerType": "MARK_PRICE", 
          "displayQuantity": "0.001"
      }
  ]
}

Channel Update Fields

Fields
Type
Description

table

STRING

order

data

LIST of dictionary

notice

STRING

OrderOpened

accountId

STRING

Account identifier

clientOrderId

STRING

Client assigned ID to help manage and identify orders with max value 9223372036854775807

orderId

STRING

Unique order ID from the exchange

price

STRING

Limit price submitted (only applicable for LIMIT order types)

quantity

STRING

Quantity submitted

amount

STRING

"0.0" if not provided in the request

side

STRING

BUY or SELL

status

STRING

Order status

marketCode

STRING

Market code e.g. OX-USDT

timeInForce

STRING

Client submitted time in force, GTC by default

timestamp

STRING

Current millisecond timestamp

remainQuantity

STRING

Working quantity

orderType

STRING

LIMIT, STOP_LIMIT, or STOP_MARKET

stopPrice

STRING

Stop price submitted (only applicable for STOP order types)

limitPrice

STRING

Limit price submitted

isTriggered

STRING

False or True

triggerType

STRING

Stops are triggered on MARK_PRICE

displayQuantity

STRING

Quantity displayed in the book, primarily used for iceberg orders, otherwise echos the quantity field

PreviousOrder ChannelNextOrder Closed

Last updated 6 months ago

☁️