Note that if you use more than two calls per second for a public API or multiple and unnecessary retrieval of redundant volumes of data, your IP address may be banned.
Code for use in public api:
Returns all active markets. Sample output:
{"success":true, "result":[{"market":"btc_usd", "market_wallet":"Bitcoin", "base_wallet":"United States dollar", "market_title":"BTC", "base_title":"USD", "active":true}]}
Call: curl -X GET 'https://fedlio.com/api/v1/markets' -H 'Content-Type: application/json'
Returns last 24-hour summary of all active markets. Sample output:
{"success":true, "result":[{"market":"btc_usd", "volume":"6.81629536", "high":"12475.09000000", "low":"11225.82000000", "price":"11901.00000000", "average":"11850.45500000", "percent":"-4.60", "timestamp":1517020192, "active":true}, {"market":"eth_usd", "currency":"Ethereum", "base":"United States dollar", "volume":"20.50012296", "high":"163.10000000", "low":"103.01200000", "price":"141.41900000", "average":"163.00600000", "percent":"0.25", "timestamp":1517020192, "active":true}]}
Call: curl -X GET 'https://fedlio.com/api/v1/market' -H 'Content-Type: application/json'
Used to get current tick values for the market. Sample output:
{"success":true,"result":{"volume":"0.00000000", "high":"0.00000000", "low":"0.00000000", "open":"0.00000000", "price":"0.40000000", "average":"0.00000000", "percent":"0.00", "timestamp":1522774844}}
Required parameters: market
Call: curl -X GET 'https://fedlio.com/api/v1/ticker?market=btc_usd' -H 'Content-Type: application/json'
Returns the order book for this market. Sample output:
{"success":true, "result":{"buy":[{"amount":"0.00105677", "price":"14813.87600000"}],"sell":[{"amount":"0.02650000", "price":"14386.00000000"}]}}
Required parameters: market, count (max: 200)
Call: curl -X GET 'https://fedlio.com/api/v1/orders?market=btc_usd&count=100' -H 'Content-Type: application/json'
Gets the historical transactions of a particular market. Sample output:
{"success":true, "result":[{"tradeid":6, "price":"14489.00000000", "amount":"0.01634253", "total":"236.78691717", "type":"buy", "timestamp":1515680304},{"id":2, "price":"14513.44400000", "amount":"0.00064696", "total":"9.38961773", "type":"buy", "timestamp":1515680222}]}
Required parameters: market, count (max: 200)
Call: curl -X GET 'https://fedlio.com/api/v1/history?market=btc_usd&count=100' -H 'Content-Type: application/json'
Gets candles in the format of historical trades of a particular market. Sample output:
{"success":true,"result":[{"open":"1.00000000", "close":"1.00000000", "high":"1.00000000", "low":"1.00000000", "volume":"0.00000001", "timestamp":1542873600}]}
Required parameters: market, period in min. (5, 15, 30, 60, 360, 720, 1440, 10080)
Call: curl -X GET 'https://fedlio.com/api/v1/chart?market=btc_usd&period=30' -H 'Content-Type: application/json'
Code for use in trading api:
You can generate your keys on this page: API KEYS
Get the balance of all your coins. Sample output:
{"success":true,"result":[{"title":"USD", "description":"United States dollar", "balance":"0.00000000", "amount_sell":"0.00000000", "amount_buy":"0.00000000"},{"title":"CNY", "description":"Renminbi", "balance":"0.00000000", "amount_sell":"0.00000000", "amount_buy":"0.00000000"}]}
Call: curl -X POST '/api/v1/trading/balances' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Get the balance of a specific currency. Sample output:
{"success":true,"result":[{"title":"BTC", "description":"Bitcoin", "balance":"1.00000000", "amount_sell":"0.00000000", "amount_buy":"0.00000000"}]}
Required parameters: currencies
Call: curl -X POST '/api/v1/trading/balance' -d '{"currencies":"btc"}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Create orders and trade on the trade. Sample output:
{"success":true,"result":"Order 4 placed"}
Required parameters: market, type (sell, buy), price, amount
Call: curl -X POST '/api/v1/trading/order/create' -d '{"market":"eth_btc", "type":"sell", "price":1, "amount":1}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Cancel an order. Sample output:
{"success":"Order canceled"}
Required parameters: orderid
Call: curl -X POST '/api/v1/trading/order/cancel' -d '{"orderid":1}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Get order data. Sample output:
{"success":true,"result":{"orderid":1,"market":"eth_btc", "type":"buy", "price":"0.00000002", "amount":"5.00000000", "total":"0.00000012", "filled":"0.00", "status":"cancel"}}
Required parameters: orderid
Call: curl -X POST '/api/v1/trading/order' -d '{"orderid":1}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Get the list your open orders. Sample output:
{"success":true,"result":[{"orderid":7,"market":"eth_btc", "type":"sell", "price":"1.00000000", "amount":"1.00000000", "total":"1.00000000", "filled":"0.00", "status":"open"}]}
Required parameters: market
Call: curl -X POST '/api/v1/trading/orders' -d '{"market":"eth_btc"}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Get the list historic orders. Sample output:
{"success":true,"result":[{"orderid":7,"market":"eth_btc", "type":"sell", "price":"1.00000000", "amount":"1.00000000", "total":"1.00000000", "filled":"0.00", "status":"open"}]}
Extra options: market, type (sell, buy), status (open, closed,cancel)
Call: curl -X POST '/api/v1/trading/orders/history' -d '{"market":"eth_btc"}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'
Get the list historic trades. Sample output:
{"success":true,"result":[{"tradeid":40,"market":"btc_usd", "type":"sell", "price":"1.00000000", "amount":"0.00000000", "total":"0.00000001", "date":1542892425}}]}
Extra options: market, type (sell, buy)
Call: curl -X POST '/api/v1/trading/trades' -d '{"market":"eth_btc", "type":"sell"}' -H 'Content-Type: application/json' -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'x-api-signature: SIGNATURE' -H 'x-api-tonce: TONCE'