Stormgain Api Endpoint
Stormgain Api Endpoint
SUMMARY
The public GET request endpoints are intended to allow access to market data.
Endpoints return results in JSON format. Referenced in the /assets and /ticker endpoints is a Unified
Cryptoasset ID (UCID). Please view this page for more information on the UCID.
1
[Section A] Spot Exchanges
ENDPOINT OVERVIEW
2
ENDPOINT SUMMARY
SUMMARY /api/v1/spot/summary
The summary endpoint is there to provide a top level summary information for each currency available
on the exchange.
[
{
"trading_pairs":
"BTC_USDT", "last_price":
"9190.86",
"lowest_ask": "9187.35",
"highest_bid": "9181.5",
"base_volume": "23.85",
"quote_volume": "219202.011",
"price_change_percent_24h": "-0.88",
"highest_price_24h": "9344.36",
"lowest_price_24h": "9170.92"
},
{
"trading_pairs":
"ETH_USDT", "last_price":
"238.105",
"lowest_ask": "238.521",
"highest_bid": "238.322",
"base_volume": "151.23",
"quote_volume": "36008.61915",
"price_change_percent_24h": "-1.96",
"highest_price_24h": "245.253",
"lowest_price_24h": "237.737"
}
]
3
ENDPOINT A1 (Assets)
ASSETS /api/v1/assets
The assets endpoint is there to provide a detailed summary for each currency available on the
exchange.
{
"BTC": {
"unified_cryptoasset_id
": 1, "name":
"Bitcoin",
"slug": "bitcoin",
"can_withdraw":
true,
"can_deposit":
true
},
"ETH":
{
"unified_cryptoasset_id":
1027, "name": "Ethereum",
"slug":
"ethereum",
"can_withdraw":
true,
"can_deposit":
true
}
}
4
ENDPOINT A2 (Ticker)
TICKER /api/v1/ticker
The ticker endpoint is there to provide a 24-hour pricing and volume summary for each market pair that
is available on the exchange.
{
"BTC_USDT": {
"base_id": 1,
"quote_id": 825,
"isFrozen": 0,
"last_price": "8513.29",
"base_volume": "1.5",
"quote_volume": "12769.935"
},
"LTC_USDT":
{
"base_id": 2,
"quote_id": 825,
"isFrozen": 0,
"last_price": "55.002",
"base_volume": "19.8",
"quote_volume": "1089.0396"
}
}
isFrozen integer Indicates if the market is currently enabled (0) or disabled (1).
5
ENDPOINT A3 (Order Book)
ORDERBOOK /api/v1/orderbook/market_pair
The order book endpoint is there to provide a complete level 2 order book (arranged by best asks/bids) with
depth of 10 returned for a given market pair.
Parameters.
Name Type Description
{
"timestamp":
"1579882142158", "bids": [
[
"8502.2",
"0.29"
]
,
[
"8501.35",
"0.46"
]
],
"asks": [
[
"8508.28",
"0.27"
]
,
[
"8509.13",
"0.21"
]
]
}
6
ENDPOINT A4 (Trades)
TRADES /api/v1/trades/market_pair
The trades endpoint is there to return data on all recently completed trades for a given market pair.
Parameters.
Name Type Description
[
{
"trade_id": 1622833825,
"timestamp": "1579794503712",
"type": "sell",
"price": "8382.75",
"base_volume": "0.01",
"quote_volume": "83.8275"
},
...
]
trade_id integer A unique ID associated with the trade for the currency pair
transaction.
Note: Unix timestamp does not qualify as trade_id.
7
ENDPOINT A5 (Interests)
INTERESTS /api/v1/interest
Deposits interests are available on the exchange for some market pairs
[
{
"symbol": "BTC",
"rate": 0.1,
"startTime": 1572220800,
"endTime": 1603843200,
"durationDays": 30,
"minimumAmount": 0.014,
"maximumAmount": 0,
"isEarning": true
}
]
durationDays integer Number of days users have to deposit their coins, null if
unavailable.
minimumAmount float Minimum amount, null if unavailable.
maximumAmount float Maximum amount, null if unavailable.
isEarning boolean True if user get interest.
8
[Section B] Derivative Exchanges
ENDPOINT OVERVIEW
9
ENDPOINT B1 (Contracts)
[
{
"ticker_id":“TC-PERPUSDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": "9196.72",
"base_volume": "1433.09713839",
"USD_volume": "0",
"quote_volume": "13283108.123",
"bid": "9193.25",
"ask": "9198.18",
"high": "9347.34",
"low": "9152.37",
"product_type": "Perpetual",
"open_interest": "273",
"open_interest_usd": "0",
"index_price": "9196.72",
"funding_rate": "0.00004",
"next_funding_rate": "0.00004",
"next_funding_rate_timestamp": 1594760400000,
"maker_fee": "0",
"taker_fee": "0",
"contract_type": "Vanilla",
"contract_price": "9196.72",
"contract_price_currency": "USDT"
}
]
10
Name Type Description
11
ENDPOINT B2 (Orderbook)
ORDERBOOK /api/v1/derivatives/orderbook/market_pair
Order book depth of any given trading pair, split into two different arrays for bid and ask orders. This is
similar to Endpoint A3 for spot markets.
Parameters.
Name Type Description
{
"timestamp":
"1594718312238", "bids": [
[
"9197.25",
"109.37"
]
,
[
"9196.33",
"59.17"
]
"asks": [
[
"9205.45",
"110.62"
]
,
[
"9207.87",
"54.96"
]
]
}
Name Data Type Description
12
[Section C] DEX Exchanges
ENDPOINT OVERVIEW
ENDPOINT C1 (Contracts)
[
{
"ticker_id": "BTC-PERPUSDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"last_price": "9196.72",
"base_volume": "1433.09713839",
"USD_volume": "0",
"quote_volume": "13283108.123",
"bid": "9193.25",
"ask": "9198.18",
"high": "9347.34",
"low": "9152.37",
"product_type": "Perpetual",
"open_interest": "273",
"open_interest_usd": "0",
"index_price": "9196.72",
"funding_rate": "0.00004",
"next_funding_rate": "0.00004",
"next_funding_rate_timestamp": 1594760400000,
"maker_fee": "0",
"taker_fee": "0",
"contract_type": "Vanilla",
"contract_price": "9196.72",
"contract_price_currency": "USDT"
}
]
13
Name Type Description
last_price decimal Last transacted price of base currency based on given quote
currency
open_interest decimal The number of outstanding derivatives contracts that have not been
settled
open_interest_usd decimal The sum of the Open Positions (long or short) in USD Value of the
contract (not implemented yet)
maker_fee decimal Fees for filling a “maker” order (can be negative if rebate is given)
taker_fee decimal Fees for filling a “taker” order (can be negative if rebate is given)
contract_price_currency string The currency which the contract is priced in (e.g. USD, EUR, BTC,
USDT)
14
ENDPOINT C2 (Orderbook)
ORDERBOOK /api/v1/dex/orderbook/market_pair
Order book depth of any given trading pair, split into two different arrays for bid and ask orders. This
is similar to Endpoint A3 for spot markets.
Parameters.
Name Type Description
{
"timestamp": "1594718312238",
"bids": [
[
"9197.25",
"109.37"
],
[
"9196.33",
"59.17"
]
"asks": [
[
"9205.45",
"110.62"
],
[
"9207.87",
"54.96"
]
]
}
timestamp integer Unix timestamp in milliseconds for when the last updated time
occurred.
bids decimal An array containing 2 elements. The offer price and quantity for
each bid order
asks decimal An array containing 2 elements. The ask price and quantity for
each ask order
15