Shorting
Manage short positions, position settlement, and portfolio risk
Note: Shorting is not available to all users and the following endpoints are only available to accounts that have enabled Shorting
get
https://api.sfox.com
/v1/margin/loans
Get Positions
Response Body
Key
Description
Example
id
Position ID
3835
status
Position status ("ACTIVE" or "CLOSED")
"ACTIVE"
date_added
Date the position was opened
"2022-06-30T01:01:55.000Z"
date_loan_closed
Date the position was closed (null if active)
"2022-06-30T01:02:47.000Z"
loan_currency
Currency borrowed to open the short position
"btc"
collateral_currency
Currency held as collateral for the position
"usd"
pair
Currency pair short sold
"btcusd"
original_collateral_qty
Initial amount of the collateral currency held when the position was opened
2101.94565
current_collateral_qty
Current amount of the collateral currency held (0 when closed)
101.99
original_loan_qty
Initial Position Size–amount of the loan currency borrowed for the position
0.1
current_loan_qty
Current Position Size–amount of the loan currency outstanding
0.001
interest_qty
Amount of the loan currency that has accrued to the position for interest
0.000001
interest_rate
Current annualized interest rate of the position (0.05 = 5% annualized)
0.05
margin_type
Position side ("MARGIN_SHORT")
"MARGIN_SHORT"
order_id
Order ID that opened the position
1127584
proceeds
Remaining proceeds from the position (current_loan_qty * order fill price
2000.11
get
https://api.sfox.com
/v1/margin/account
Get Account Metrics
Response Body
Key
Description
Example
account_value
Your account's current value in USD
100865.24309997
equity
Your account's USD balance - position_notional
100826.66859092
position_notional
The USD value of the active short positions in your account
228.06440592
collateral
The total amount of collateral you hold in your account (USD balance - USD proceeds from opening short positions)
100827.35335005
free_collateral
The collateral available for opening new short positions
100587.88572383
margin_level
Your account's current risk level (equity / position_notional). null if you have no active positions
442.09734607
margin_call_level
The margin_level at which you will receive a notification from sFOX to let you know that your margin_level is low and we suggest either closing positions or depositing additional collateral (USD) to avoid liquidation
0.15
maintenance_margin_level
The margin_level at which your position will be automatically liquidated
0.05
Copy link
Outline
get
Get Positions
get
Get Account Metrics