Skip to content

Latest commit

 

History

History
320 lines (248 loc) · 8.43 KB

AssetApi.md

File metadata and controls

320 lines (248 loc) · 8.43 KB

IconomiApi.Api.AssetApi

All URIs are relative to https://api.iconomi.com

Method HTTP request Description
AssetDetails GET /v1/assets/{ticker} Asset details
AssetHistory GET /v1/assets/{ticker}/pricehistory Historical information
AssetList GET /v1/assets List of Assets
AssetStatistics GET /v1/assets/{ticker}/statistics Statistics
AssetTicker GET /v1/assets/{ticker}/price Current ticker

AssetDetails

AssetInfo AssetDetails (string ticker)

Asset details

Returns information about one specific Asset.

Example

using System;
using System.Diagnostics;
using IconomiApi.Api;
using IconomiApi.Client;
using IconomiApi.Model;

namespace Example
{
    public class AssetDetailsExample
    {
        public void main()
        {
            var apiInstance = new AssetApi();
            var ticker = ticker_example;  // string | 

            try
            {
                // Asset details
                AssetInfo result = apiInstance.AssetDetails(ticker);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetApi.AssetDetails: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ticker string

Return type

AssetInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetHistory

Chart AssetHistory (string ticker, string currency = null, long? from = null, long? to = null, string granulation = null)

Historical information

The price history returns data points for the given period. Different granulation of data can be returned based on the length of the period provided from daily to 5 minute (one price point per period). From and to are optional parameters (both are either supplied or neither is supplied). If from/to are not supplied a default of last month is returned with hourly granulation.

Example

using System;
using System.Diagnostics;
using IconomiApi.Api;
using IconomiApi.Client;
using IconomiApi.Model;

namespace Example
{
    public class AssetHistoryExample
    {
        public void main()
        {
            var apiInstance = new AssetApi();
            var ticker = ticker_example;  // string | 
            var currency = currency_example;  // string |  (optional)  (default to USD)
            var from = 789;  // long? |  (optional) 
            var to = 789;  // long? |  (optional) 
            var granulation = granulation_example;  // string |  (optional) 

            try
            {
                // Historical information
                Chart result = apiInstance.AssetHistory(ticker, currency, from, to, granulation);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetApi.AssetHistory: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ticker string
currency string [optional] [default to USD]
from long? [optional]
to long? [optional]
granulation string [optional]

Return type

Chart

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetList

List AssetList ()

List of Assets

Returns a list of all assets on platform.

Example

using System;
using System.Diagnostics;
using IconomiApi.Api;
using IconomiApi.Client;
using IconomiApi.Model;

namespace Example
{
    public class AssetListExample
    {
        public void main()
        {
            var apiInstance = new AssetApi();

            try
            {
                // List of Assets
                List<Asset> result = apiInstance.AssetList();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetApi.AssetList: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetStatistics

Statistics AssetStatistics (string ticker, string currency = null)

Statistics

Returns statistics of the strategy; returns, max drawdown and volatility for strategy.

Example

using System;
using System.Diagnostics;
using IconomiApi.Api;
using IconomiApi.Client;
using IconomiApi.Model;

namespace Example
{
    public class AssetStatisticsExample
    {
        public void main()
        {
            var apiInstance = new AssetApi();
            var ticker = ticker_example;  // string | 
            var currency = currency_example;  // string |  (optional)  (default to USD)

            try
            {
                // Statistics
                Statistics result = apiInstance.AssetStatistics(ticker, currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetApi.AssetStatistics: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ticker string
currency string [optional] [default to USD]

Return type

Statistics

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetTicker

Ticker AssetTicker (string ticker, string currency = null)

Current ticker

Returns the current ticker of the Asset. The price is refreshed every minute.

Example

using System;
using System.Diagnostics;
using IconomiApi.Api;
using IconomiApi.Client;
using IconomiApi.Model;

namespace Example
{
    public class AssetTickerExample
    {
        public void main()
        {
            var apiInstance = new AssetApi();
            var ticker = ticker_example;  // string | 
            var currency = currency_example;  // string |  (optional)  (default to USD)

            try
            {
                // Current ticker
                Ticker result = apiInstance.AssetTicker(ticker, currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AssetApi.AssetTicker: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ticker string
currency string [optional] [default to USD]

Return type

Ticker

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]