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. Account Management

Get All Balances

PreviousAccount ManagementNextGet All Currencies

Last updated 5 months ago

GET https://api.sfox.com/v1/user/balance

Retrieve your account balances by currency. Results include an array of objects, each of which has details for a single currency.

: 5 requests per 10 seconds

sFOX recommends using the instead, which allows you to receive all balance changes in real-time, and does not count towards your request limit.

Response Body

Key
Description

currency

The currency

balance

The total balance of this currency in your account across all wallets outlined below

available

The portion of the balance that is available for trading or withdrawals

held

Potion of the balance that is currently on hold and unavailable for trading or withdrawals (i.e. an ACH deposit that has yet to settle)

borrow_wallet

Amount of the currency , represented as the borrow wallet balance

collateral_wallet

Amount of the current being held as collateral in your collateral wallet

lending_wallet

Amount of the currency in your lending wallet

trading_wallet

Amount of the currency in your trading wallet

Responses

200
[
  {
    "currency":"btc",
    "balance": 1,
    "available": 1,
    "held": 0,
    "borrow_wallet": 0,
    "collateral_wallet": 0,
    "lending_wallet": 0,
    "trading_wallet": 1
  },
  {
    "currency":"usd",
    "balance": 100,
    "available": 90,
    "held": 10,
    "borrow_wallet": 0,
    "collateral_wallet": 0,
    "lending_wallet": 0,
    "trading_wallet": 100
  }
]

Example Requests

curl -H 'Authorization: Bearer <API_TOKEN>' 
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/user/balance'
const axios = require('axios');

axios({
  method: 'get',
  url: 'https://api.sfox.com/v1/user/balance',
  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/user/balance",
  headers={
    "Authorization": "Bearer <API_KEY>",
  }
)
print(data)
Rate Limit
Balances WebSocket feed