sFOX API
Ask or search…
⌃K
Links

Account Management

Account information (balances and transaction history) and account funding (deposits and withdrawals)
get
https://api.sfox.com/v1
/user/balance
Account Balance

Response Body

Key
Description
currency
Currency code (example: btc, eth, ltc)
balance
The total amount of this currency held on sFOX across all wallets outlined below
available
Amount of the currency available for trading or withdrawals
held
Amount of the currency “on hold†i.e. pending ACH deposits
borrow_wallet
Amount of the currency borrowed, represented as the borrow wallet balance
collateral_wallet
Amount of the currency 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

Example Request

Shell
NodeJS
Python
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)
​
get
https://api.sfox.com/v1
/account/transactions
Transaction History

Response Body

This endpoint returns an array of objects, each of which has the details of the transaction
Key
Description
Example
id
Transaction ID
24619905
AtxId
Account Transaction ID, if this transaction is a deposit, withdrawal, credit, or charge
572195
order_id
Order ID, if this transaction is associated with an order (a buy or sell)
"687484791"
client_order_id
The optional ID that you specified when placing an order​
"my-first-order"
day
The timestamp of the transaction, in ISO8601 format
"2019-07-31T17:26:30.000Z"
action
The action name of this transaction (“Depositâ€, “Withdrawâ€, “Buyâ€, “Sellâ€, "Credit", "Charge")
"Deposit"
currency
The base currency of the transaction
"btc"
memo
The optional memo you specified for a Withdrawal transaction
"sending BTC to counterparty"
amount
The transacted amount of the currency
0.00262916
net_proceeds
Net amount after fees
0.02
price
Price per unit of the currency
4.5072
fees
Fee paid in terms of the currency
0
status
The current transaction status
"done"
hold_expires
The expiration date of a hold on this transaction, if applicable
"2019-07-31T17:26:30.000Z"
tx_hash
The transaction hash, if applicable (applicable to crypto deposits and withdrawals)
"223c7f80c6c5ef8e57ae220a3cfecc192e7e1cd6734e73b0c6487bfe2061ccce"
algo_name
The algorithm used to execute the transaction, if the transaction is an order
"TWAP"
algo_id
The ID associated with the algorithm
"307"
account_balance
Your balance of the currency after the transaction
10.00212
AccountTransferFee
Fee paid in terms of the currency for deposit or withdrawal transactions
0
Description
A description of the transaction. For crypto deposits, this is your sFOX account deposit address. For crypto withdrawals this is the destination address
" "
added_by_user_email
The username/email address of the user who initiated this transaction
symbol
The currency pair of the transaction for trades (action = Buy or Sell)
"eth/usd"
timestamp
The UNIX timestamp of the transaction in milliseconds
1649292759000

Transaction Statuses

The following table describes the possible Status Codes returned from this request.
These Status Codes are only applicable to deposit and withdrawal transactions. Other transaction types will always be returned with status = Done
Status Code
Deposit Context
Withdrawal Context
Started
Transaction initiated
Transaction initiated
Approval Required
N/A
Approval is required before the transaction will be initiated
Processing Automatic withdrawal
N/A
Transaction is being broadcast
Confirmed
Transaction has been received. It is not available yet but will be shortly
Transaction has been approved. It has not been sent yet but will be shortly
Done
Transaction is complete and available to you
Transaction is complete
Canceled
Transaction has been canceled
Transaction has been canceled
Admin Hold, Pending Further Review
Transaction was flagged for review. Contact [email protected] for more information
Transaction was flagged for review. Contact [email protected] for more information

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/account/transactions?from=0&to=1565114130000'
const axios = require('axios');
​
axios({
method: 'get',
url: 'https://api.sfox.com/v1/account/transactions',
headers: {
'Authorization': 'Bearer <API_KEY>'
},
params: {
from: 0,
to: 1565114130000
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
​
data = requests.get(
"https://api.sfox.com/v1/account/transactions",
headers={
"Authorization": "Bearer <API_KEY>",
}
params={
"from": 0,
"to": 1565114130000
}
)
print(data)
​
post
https://api.sfox.com/v1
/user/bank/deposit
ACH Bank Transfer

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X POST \
--data '{"amount": 100}' \
'https://api.sfox.com/v1/user/bank/deposit'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/v1/user/bank/deposit',
headers: {
'Authorization': 'Bearer <API_KEY>'
},
data: {
amount: 100
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
​
data = requests.post(
"https://api.sfox.com/v1/user/bank/deposit",
headers={
"Authorization": "Bearer <API_KEY>",
},
data={
"amount": 100
}
)
print(data)
get
https://api.sfox.com/v1
/user/deposit/address/:currency
Crypto Deposit Addresses

Response Body

Key
Description
currency
Crypto asset
address
Crypto address to use for deposits

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/user/deposit/address/btc'
const axios = require('axios');
​
axios({
method: 'get',
url: 'https://api.sfox.com/v1/user/deposit/address/eth',
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/deposit/address/eth",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
post
https://api.sfox.com/v1
/user/deposit/address/:currency
Create New Deposit Address

Response Body

Key
Description
currency
Crypto asset
address
Crypto address to use for deposits

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-X POST \
'https://api.sfox.com/v1/user/deposit/address/eth'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/v1/user/deposit/address/eth',
headers: {
'Authorization': 'Bearer <API_KEY>'
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
​
data = requests.post(
"https://api.sfox.com/v1/user/deposit/address/eth",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
post
https://api.sfox.com/v1
/user/withdraw
Withdraw

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X POST \
--data '{"amount": 1, "currency": "eth", "address": "0x123456"}' \
'https://api.sfox.com/v1/user/withdraw'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/v1/user/withdraw',
headers: {
'Authorization': 'Bearer <API_KEY>'
},
data: {
currency: 'eth',
address: '0x123456',
amount: 1
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
​
data = requests.post(
"https://api.sfox.com/v1/user/withdraw",
headers={
"Authorization": "Bearer <API_KEY>",
},
data={
"currency": "eth",
"address": "0x123456"
"amount": 1
}
)
print(data)
get
https://api.sfox.com/v1
/withdraw-fee/:currency
Withdrawal Fee

Response Body

Key
Description
fee
The withdrawal fee of requested currency

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/withdraw-fee/btc'
const axios = require('axios');
​
axios({
method: 'get',
url: 'https://api.sfox.com/v1/withdraw-fee/btc',
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/withdraw-fee/btc",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
get
https://api.sfox.com
/v1/account/fee-rates
Get Fees

Response Body

Field
Description
Example
volume
Your 14-day trailing volume in USD
2302868.809741
makerRate
Your maker fee rate for trades executed as a maker in the Ox and Dark Pool order books
0.00021
nprRate
Your taker fee rate when trading with routing type = NetPrice (NPR)
0.00035
nprOffRate
Your taker fee rate when trading with routing type = Smart (NPR-Off)
0.00105

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/account/fee-rates'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/v1/account/fee-rates',
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/account/fee-rates",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
get
https://api.sfox.com
/v1/currency
Get Currencies

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/v1/currency'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/v1/currency',
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/currency",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)
get
https://api.sfox.com
/v1/markets/currency-pairs
Get Currency Pairs

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-X GET \
'https://api.sfox.com/markets/currency-pairs'
const axios = require('axios');
​
axios({
method: 'post',
url: 'https://api.sfox.com/markets/currency-pairs',
headers: {
'Authorization': 'Bearer <API_KEY>'
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});
import requests
​
data = requests.get(
"https://api.sfox.com/markets/currency-pairs",
headers={
"Authorization": "Bearer <API_KEY>",
}
)
print(data)