NAV undefined
javascript

REST Endpoints

OAuth Endpoints

Introduction

Welcome to IONLOOP.TRADE !

With REST-API, developers and users can access information.

Our state-of-the-art REST-API is designed to empower both developers and users, providing a gateway to a wealth of information. Whether you're a seasoned developer seeking to enhance your application's capabilities or a user looking for comprehensive integration, our API documentation stands as your trusted and comprehensive resource.

General API Information

The following base endpoints are available:


API Key Restrictions

After creating the API key, the default restrictions is Enable Reading. To enable withdrawals via the API, the API key restriction needs to be modified through the IONLOOP UI.

HTTP Return Codes

HTTP 4XX return codes are used for malformed requests; the issue is on the sender's side.
HTTP 403 return code is used when the WAF Limit (Web Application Firewall) has been violated.
HTTP 409 return code is used when a cancelReplace order partially succeeds. (e.g. if the cancellation of the order fails but the new order placement succeeds.)
HTTP 429 return code is used when breaking a request rate limit.
HTTP 418 return code is used when an IP has been auto-banned for continuing to send requests after receiving 429 codes.
HTTP 5XX return codes are used for internal errors; the issue is on our side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.

Error Codes and Messages

If there is an error, the API will return an error with a message of the reason.

IP Limits

When a 429 is received, it's your obligation as an API to back off and not spam the API. Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418). IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days. The limits on the API are based on the IPs, not the API keys.

There is a limit of 60 requests per attempt every 1 minute per IP.




Exchange Endpoints

Get Tickers

If request is successfull status 0 you will recieve full list of tickers with prices

        {
            "symbol": "ETHBTC",
            "price": "0.05980000"
        },
        {
            "symbol": "LTCBTC",
            "price": "0.00165900"
        },
        {
            "symbol": "BNBBTC",
            "price": "0.00758100"
        },
        {
            "symbol": "NEOBTC",
            "price": "0.00027730"
        }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
symbol Optional Valid symbol value BTCUSDT

Get Fees

If request is successfull status 0 you will recieve full list of fees

        {
            "symbol": "ETHBTC",
            "market": {
                "minimumOrderSELL": 0.0017,
                "minimumOrderBUY": 0.0001,
                "OrderTypeBUY": 5,
                "OrderTypeSELL": 4
            },
            "limit": {
                "minimumOrderETHBTC": 0.0017,
                "OrderTypeETHBTC": 4
            }
        }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
symbol Optional Valid symbol value BTCUSDT

Bot Endpoints

Get Constructor

If request is successfull status 0 will be returned with constructor information

    {
        "status": "0",  
        "data": {
            "name": "SPOT-TEST",
            "ordertype": "MARKET",
            "type": "Spot",
            "strategy": "trading",
            "tradinghook": "https://ionloop.trade/api/bot/888519266553",
            "symbol": "ETHUSDT",
            "tradeinterval": "sorted",
            "amounttype": "regulated",
            "startposition": "buy",
            "profitcurrency": "USDT",
            "leverage": "",
            "hooktype": "hook2",
            "amountpercent": "100",
            "borrowpercent": "",
            "stoppercent": "",
            "signalalert": false,
            "tradealert": true,
            "startdate": "2023-10-18T23:23:57.460Z",
            "enddate": "2023-10-28T23:23:58.102Z",
            "backtest": "true",
            "backtestInfo": { "buyBalance": "20", "sellBalance": "0" },
            "profit": "0.00" }
        }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Optional Constructor name

Change Status

If request is successfull status 0 will be returned with constructor information

    {
        "status": "0" 
    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name

Push Trading Alert

If request is successfull status 0 will be returned with constructor information

    {
        "status": "0" 
    }


Parameters Description
id Required add bot ID to url
Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name
type Required Must provide constructor type (Spot, Margin, Futures)

Change Testnet

If request is successfull status 0 then status is changed and bot trades cleared

    {
        "status": "0" 
    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name

Create Constructor

If request is successfull status 0 then constructor is succesfully added

    {
        "status": "0" 
    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name
type Required Value must be Spot, Futures, Margin
backtest Required Value must be true or false to all market types
symbol Required Symbol must be added like this BTCUSDT
strategy Required Strategy have 2 types: trading, trailing
profitcurrency Required Profit currency is used just to display profit
tradeinterval Required Trade Interval have 2 types sorted and mixed
amounttype Required Amount have 3 types fixed, regulated, custom
startposition Required Start position can be buy or sell
amountpercent Required Amount percent must be added only with regulated and fixed amount type.
borrowpercent Required Borrow percent is used only in Margin, Futures markets.
stoppercent Required Stop Percent is only used if trailing is used
leverage Required Leverage is used only when Futures market is used.
signalalert Required value must be true or false to recieve signal notifications
tradealert Required value must be true or false to recieve trade notifications

Get Trade History

If request is successfull status 0 then constructor is succesfully added,
maximum of 50 trades will be returned

    { 
        "symbol": "ETHUSDT",
        "orderId": 8151254705,
        "orderListId": -1,
        "clientOrderId": "OnZGcA2PBDABBLSKao7aTZ",
        "transactTime": 1646583003274,
        "price": 1566.28,
        "origQty": 0.01830000,
        "executedQty": 20,
        "cummulativeQuoteQty": 0.0129,
        "status": "FILLED",
        "timeInForce": "GTC",
        "type": "MARKET",
        "side": "BUY",
        "fills": [] 

    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name

Get Signal History

If request is successfull status 0 then constructor is succesfully added,
maximum of 50 signals will be returned

    { 
        "date": "10/19/2023, 6:30:59 AM",  
        "botfirsttime": true,
        "user": "erick.dev",
        "ordertype": "trading",
        "amount": "100",
        "price": "",
        "side": "buy",
        "action": "buy",
        "running2": "Enabled",
        "hooktype": "hook2",
        "reason": "missing hook information",
        "symbol": "ETHUSDT",
        "strategy": "trading",
        "type2": "SPOT",
        "botname": "SPOT-TRADING",
        "backtest": 'true',
        "assetcare": false,
        "goalincrease": 0,
        "assetprotect": 0,
        "exitposition": false,
        "stoptrade": false, 
        "stopprice": "" }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
name Required Must provide constructor name

Calendar Endpoints

Get Calendar

If request is successfull status 0 then constructor is succesfully added,
maximum of 50 events will be returned

    { 
        "describtion": "Clean my room !",
        "date": "2023-10-13T03:36:27.578Z",
        "notifications": "on",
        "notification_delay": "10 minutes"
    },
    {
        "describtion": "Dads Birthday",
        "date": "2024-01-24T19:59:24.938Z",
        "notifications": "",
        "notification_delay": ""
    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys

Save Calendar

If request is successfull status 0 then constructor is succesfully added,
maximum of 50 events will be returned

    { 
        "status": 0
    } 


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
type Required Valid type , must be default, success, error, warning
description Required Valid description text must be no longer than 300 letters.
notifications Required notifications must be sent if you want to recieve alerts, example: on, off
time Required Valid time when notification is sent 0, 10, 30, 120, 240

Indicator Endpoints

Agriculture Terms

If request is successfull status 0 then constructor is succesfully added,

    [
        { "date": "08-01", "description": "Greater Cold" },
        { "date": "23-01", "description": "Spring Begins" },
        { "date": "07-02", "description": "Rain Water" },
        { "date": "22-02", "description": "Awakening of Insects" },
        { "date": "09-03", "description": "Vernal Equinox" },
        { "date": "24-03", "description": "Clear and Bright" },
        { "date": "08-04", "description": "Grain Rain" },
        { "date": "23-04", "description": "Summer Begins" },
        { "date": "08-05", "description": "Grain Full" },
        { "date": "23-05", "description": "Grain in Ear" },
        { "date": "07-06", "description": "Summer Solstice" },
        { "date": "22-06", "description": "Minor Heat" },
        { "date": "07-07", "description": "Major Heat" },
        { "date": "22-07", "description": "Autumn Begins" },
        { "date": "07-08", "description": "Limit of Heat" }
    ]


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys

Moon Phases Terms

If request is successfull status 0 then constructor is succesfully added,

    { 
        "Waning Gibbous": [ "31-12-2023","01-01-2024","02-01-2024","29-01-2024","30-01-2024" ] 
    }


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys

Fibonacci Retracement

If request is successfull status 0 then constructor is succesfully added,

    [
        {
            "interval":"1d",
            "support":"39273.39",
            "resistance":"42649.95"
        },
        {
            "interval":"1w",
            "support":"39189.89",
            "resistance":"43929.02"
        },
        {
            "interval":"1M",
            "support":"38187.19",
            "resistance":"42283.58"
        }
    ]


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
symbol Required Valid symbol like BTCUSDT is requested

All Indicators

If request is successfull status 0 then constructor is succesfully added,

    [
        {
            "type":"RSI",
            "action":"sell",
            "value":"57.88",
            "emotion":"neutral",
            "interpretation":"The RSI value is within the typical range for the asset and does not suggest any strong signals."
        }
    ]


Body Description
apiKey Required Valid apiKey you got when created keys
secretKey Required Valid secretKey you got when created keys
symbol Required Valid symbol like BTCUSDT is requested
indicator Optional only in a case if you want to request 1 specific indicator

Indicators:

RSI EMA SMA TREND STRENGHT VOLUMESPIKE SUPERTREND PATTERN



























Errors

API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request sucks
401 Unauthorized -- Your API key is wrong
403 Forbidden -- The kitten requested is hidden for administrators only
404 Not Found -- The specified kitten could not be found
405 Method Not Allowed -- You tried to access a kitten with an invalid method
406 Not Acceptable -- You requested a format that isn't json
410 Gone -- The kitten requested has been removed from our servers
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.