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

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' '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)

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

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
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)

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 the sender 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
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

Example Request

Shell
NodeJS
Python
curl -H 'Authorization: Bearer <API_TOKEN>' \
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)

Response Body

Key
Description
currency
Crypto asset
address
Crypto address to use for deposits
post
https://api.sfox.com/v1
/user/deposit/address/:currency
Create New Deposit Address

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)

Response Body

Key
Description
currency
Crypto asset
address
Crypto address to use for deposits
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)
Copy link
Outline
get
Account Balance
Example Request
Response Body
get
Transaction History
Example Request
Response Body
post
ACH Bank Transfer
Example Request
get
Crypto Deposit Addresses
Example Request
Response Body
post
Create New Deposit Address
Example Request
Response Body
post
Withdraw
Example Request