sFOX API
Sign InOpen Account
sFOX API
sFOX API
  • Introduction
    • Welcome
    • Getting Started
    • Systems & Operations
    • Rate Limits
  • REST API
    • REST Endpoints
    • Authentication
    • Rate Limits
    • Account Management
      • Get All Balances
      • Get All Currencies
      • Get All Currency Pairs
      • Get All Transactions
      • Get Fees
    • Orders
      • Order Types
      • Create Order
      • Cancel Order
      • Cancel Multiple Orders
      • Cancel All Orders
      • Amend Order
      • Get Single Order
      • Get All Open Orders
      • Get All Done Orders
      • Get All Trades
    • Request for Quote (RFQ)
    • Post-Trade Settlement (PTS)
      • Get Account Risk Metrics
      • Get All Positions
      • Get All Funding Transactions
      • Get All Funding Rates
      • Get All Risk Modes
      • Create Transfer
    • Shorting
      • Get Account Risk Metrics
      • Get All Positions
    • Transfers
      • Get All Deposit Addresses
      • Get Single Deposit Address
      • Create Deposit Address
      • Deposit From Bank Account
      • Withdraw From Account
      • Get Single Withdrawal Fee
      • Create Transfer
    • Custody (sFOX SAFE)
      • Get Whitelisted Addresses
      • Add Whitelisted Address
      • Delete Whitelisted Address
      • Get Approval Rules
      • Create Approval Rule
      • Edit Approval Rule
      • Get Approval Requests
      • Respond to Approval Request
    • Staking
      • Get Staking Currencies
      • Get All Staking Transactions
      • Create Stake
      • Cancel Stake
      • Unstake
    • Market Data
      • Get Candlesticks
      • Get Volume Analytics
      • Get Order Estimate
      • Get Order Book
    • Reporting
      • Get Orders Report
      • Get Monthly Summary
      • Get Portfolio Valuation
      • Get All Transactions
  • WebSocket API
    • Introduction
    • Connecting
    • Rate Limits
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • Market Data
      • Order Book
      • Trades
      • Ticker
    • Orders & Account Data
      • Orders
      • Trades
      • Balances
      • Post-Trade Settlement
  • FIX API
    • FIX Order Entry
    • FIX Market Data
    • QuickFIX Guide
  • Errors
    • Error Codes
Powered by GitBook
  1. REST API
  2. Orders

Get Single Order

PreviousAmend OrderNextGet All Open Orders

Last updated 5 months ago

GET https://api.sfox.com/v1/orders/:order_id

Retrieve the details of a single order.

sFOX recommends using the instead, which streams order updates in real-time and does not count towards your request limit.

Path Parameters

Parameter
Type
Description

order_id required

string

order_id is either the order ID generated by sFOX upon order creation (id) or the client-assigned client_order_id.

Order Statuses

Status
Status Code
Description

Started

100

  • The order is open and active

  • Filled quantity may be >= 0

  • Filled quantity is < the order quantity

Cancel Pending

90

  • The order is in the process of being canceled but cancelation has not been completed

  • The order may still receive fills

Canceled

10

  • The order was successfully canceled

  • Order may have been partially filled prior to cancelation

Done

300

  • The order was completed and is no longer active

  • Filled quantity = order quantity

  • The order will not receive new fills

Responses

200
{
    "id": 2010135,
    "side_id": 500,
    "action": "Buy",
    "algorithm_id": 201,
    "algorithm": "Limit",
    "type": "Limit",
    "pair": "btcusd",
    "quantity": 0.1,
    "price": 36431,
    "amount": 0,
    "net_market_amount": 0,
    "filled": 0,
    "vwap": 0,
    "filled_amount": 0,
    "fees": 0,
    "net_proceeds": 0,
    "status": "Started",
    "status_code": 100,
    "routing_option": "WeightedExchange",
    "routing_type": "NetPrice",
    "time_in_force": "GTC",
    "expires": null,
    "dateupdated": "2023-11-17T20:52:40.000Z",
    "date_added": "2023-11-17T20:52:40.000Z",
    "client_order_id": "ea5c8afc-419a-447d-8188-659dce1a782a",
    "user_tx_id": "ea5c8afc-419a-447d-8188-659dce1a782a",
    "o_action": "Buy",
    "algo_id": 201,
    "algorithm_options": null,
    "destination": ""
}
401: Unauthorized
//Invalid API key or insufficient user permissions
{
    "error": "user lookup failed"
}
404: Not Found
//The order_id specified in the request is invalid or does not exist
{
    "error": "the requested order was not found",
    "error_code": "ORDER_NOT_FOUND"
}

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' \
  'https://api.sfox.com/v1/orders/<ORDER_ID>'
const axios = require('axios');

axios({
  method: 'get',
  url: 'https://api.sfox.com/v1/orders/<ORDER_ID>',
  headers: {
    'Authorization': 'Bearer <API_KEY>'
  }
}).then(response => {
  console.log(response)
}).catch(err => {
  console.error(err)
});
import requests

data = requests.get(
  "https://api.sfox.com/v1/orders/<ORDER_ID>",
  headers={
    "Authorization": "Bearer <API_KEY>",
  }
)
print(data)
Orders WebSocket feed