NAV Navbar
shell javascript
  • Introduction
  • Authentication
  • Signals
  • Errors
  • Introduction

    Welcome to Bytemine.io's API Hub. You can use our API to access API endpoints and our own signals, which can get information on Fundamentals of a Ticker, Historical Data, Pre-Processed Signals and more from our database.

    Currently, we have language bindings in only Shell. However, you can easily translate this to whichever platform/language you are using as these are just simple API calls. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    We offer compelling data services for a highly competitive price, if you decide to switch to one of our premium plans. On top of that you get access to the Trader's platform as well.

    If you have any questions or want to raise a concern/query, please drop in a mail at hello@bytemine.io. We'll try our best to answer your queries within 24 working hours.

    Authentication

    No tricky authorization mechanisms. Authorization of the API key is essential for requesting data.

    # With shell, you can just pass the correct API key with each request
    curl https://app.bytemine.io/api/checkForCandlestick/{api_key}/...
    
    
    $.ajax({
            url: "https://app.bytemine.io/api/checkForCandlestick/{api_key}/...",
            type: 'GET',
            success: function(data) {
                console.log(data);
            }
        });
    

    Make sure to replace {api_key} with your API key.

    To use the API you have to have an API key. You can get an API key from our developer portal.

    The API key should be included in all API requests to the server

    Signals

    Candlestick Patterns

    curl https://app.bytemine.io/api/checkForCandlestick/{api_key}/TSLA/5m
    
    
    $.ajax({
            url: "https://app.bytemine.io/api/checkForCandlestick/{api_key}/TSLA/5m",
            type: 'GET',
            success: function(data) {
                console.log(data);
            }
        });
    

    The above command returns JSON structured like this:

    {
       "success": true,
       "data": [
          {
             "time": "2020-12-08 09:30",
             "pattern": "Bearish Engulfing",
             "close": 604.48,
             "high": 654.32,
             "open": 653.69,
             "low": 588
          }
       ]
    }
    

    You can get Candlestick Patterns from our API endpoints. This can be achieved using Long Polling. However, make sure to not call our Endpoints without adding atleast a 1 Min Delay.

    HTTP Request

    GET https://app.bytemine.io/api/checkForCandlestick/{api_key}/{ticker}/{timeframe}

    Query Parameters

    Parameter Default Description
    api_key true API Key is required for authentication.
    ticker true A ticker/symbol is needed for the appropriate candlestick pattern to be returned.
    timeframe true Only one Timeframe out of these - 1m/2m/5m/15m/30m/60m/90m/1d/5d/1wk/1mo

    Example HTTP Request

    GET https://app.bytemine.io/api/checkForCandlestick/5fe69c95ed70a9869d9f9af7d8400a6673bb9ces/AAPL/5m

    curl https://app.bytemine.io/api/getTickerTrend/{api_key}/AMD/30m
    
    $.ajax({
            url: "https://app.bytemine.io/api/getTickerTrend/{api_key}/AMD/30m",
            type: 'GET',
            success: function(data) {
                console.log(data);
            }
        });
    

    The above command returns JSON structured like this:

    {
       "success": true,
       "trend": "Bearish"
    }
    

    Trends can be classified into three categories - Bullish, Bearish, Neutral. This can be achieved using Long Polling. However, make sure to not call our Endpoints without adding atleast a 1 Min Delay.

    HTTP Request

    GET https://app.bytemine.io/api/getTickerTrend/{api_key}/{ticker}/{timeframe}

    Query Parameters

    Parameter Default Description
    api_key true API Key is required for authentication.
    ticker true A ticker/symbol is needed for the appropriate candlestick pattern to be returned.
    timeframe true Only one Timeframe out of these - 1m/2m/5m/15m/30m/60m/90m/1d/5d/1wk/1mo

    Errors

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- You are not authorized to access this.
    404 Not Found -- The specified function/api method could not be found.
    406 Not Acceptable -- You requested a format that isn't json.
    429 Too Many Requests -- You're requesting data at a very fast rate! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.