Public API

Public API is available as RESTful service located at https://api.liqnet.com/public/rest/ and as WebSocket Json/Rpc Server located at wss://api.liqnet.com/public/wss/.

Current version & status: 0.10.x in public beta test. All features are LTS (Long Term Support) but you can find some bugs.

In PublicAPI PlayGround you can see how Liqnet Public API methods work.

Reference

Version

https://api.liqnet.com/public/rest/version or WebSocket send Json/Rpc request getVersion with empty string parameter.

Get current public api version.

Tickers

https://api.liqnet.com/public/rest/markets or WebSocket send Json/Rpc request getMarkets with empty string parameter.

Get all markets public tickers.

Symbols

https://api.liqnet.com/public/rest/symbols or WebSocket send Json/Rpc request getSymbols with empty string parameter.

Get all symbols info.

Ticker

https://api.liqnet.com/public/rest/marketTicker with id,[market] GET variables or WebSocket send Json/Rpc request getTicker with marketId, [marketTitle] parameter.

Get market specific public ticker.

Chart

https://api.liqnet.com/public/rest/marketOhlcv with id,[market],tick GET variables or WebSocket send Json/Rpc request getOHLCV with marketId, [marketTitle], tick parameters. Important! current version support tick 60, 3600, 86400 [1m, 1h, 1d]

Get market specific chart.

Order Book

https://api.liqnet.com/public/rest/marketOrderBook with id,[market] GET variables or WebSocket send Json/Rpc request getOrderBook with marketId, [marketTitle] parameter.

Get market specific order book.

Last Trades

https://api.liqnet.com/public/rest/marketLastTrades with id,[market] GET variables or WebSocket send Json/Rpc request getLastTrades with marketId, [marketTitle] parameter.

Get market specific last trades.

Technical Analisys

https://api.liqnet.com/public/rest/marketOhlcvTA with id,[market],taSdK settings GET variables or WebSocket send Json/Rpc request getTechnicalAnalysis with marketId, [marketTitle], taRequest = "RSI1", taSdkSettings taSettings parameters.

Get market specific technical indicator based on last chart data. Attention: This endpoint in alpha-test state.

List of supported indicators & required :

  • SMA1 - MovingAverage.SimpleMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
    sample: https://api.liqnet.com/public/rest/marketOhlcvTA?id=&tick=60&tarequest=SMA1&source=3&periods=14
  • EMA1 - MovingAverage.ExponentialMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
  • TMA1 - MovingAverage.TimeSeriesMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
  • TMA2 - MovingAverage.TriangularMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
  • VMA1 - MovingAverage.VariableMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
  • WMA1 - MovingAverage.WeightedMovingAverage. [taSdkSettings.source1, taSdkSettings.periods]
  • WWS1 - MovingAverage.WellesWilderSmoothing. [taSdkSettings.source1, taSdkSettings.periods]
  • VIDYA1 - MovingAverage.VIDYA. [taSdkSettings.source1, taSdkSettings.periods, taSdkSettings.R2Scale]
  • RSI1 - index.RelativeStrengthIndex. [taSdkSettings.source1, taSdkSettings.periods]
  • ASI1 - index.AccumulativeSwingIndex. [taSdkSettings.periods]
  • CMF1 - index.ChaikinMoneyFlow. [taSdkSettings.periods]
  • CCI1 - index.CommodityChannelIndex. [taSdkSettings.periods]
  • CRS1 - index.ComparativeRelativeStrength. [taSdkSettings.source1, taSdkSettings.source2]
  • HV1 - index.HistoricalVolatility. [taSdkSettings.source1, taSdkSettings.periods, taSdkSettings.barHistory, taSdkSettings.standardDeviations]
  • MI1 - index.MassIndex. [taSdkSettings.periods]
  • MFI1 - index.MoneyFlowIndex. [taSdkSettings.periods]
  • NVI1 - index.NegativeVolumeIndex. [taSdkSettings.source1]
  • OBV1 - index.OnBalanceVolume. [taSdkSettings.source1]
  • PER1 - index.Performance. [taSdkSettings.source1]
  • PVI1 - index.PositiveVolumeIndex. [taSdkSettings.source1]
  • PVT1 - index.PriceVolumeTrend. [taSdkSettings.source1]
  • SMI1 - index.StochasticMomentumIndex. [taSdkSettings.kPeriods, taSdkSettings.kSmooth, taSdkSettings.kDoubleSmooth, taSdkSettings.dPeriods, taSdkSettings.ind1, taSdkSettings.ind2]
  • SWI1 - index.SwingIndex. [taSdkSettings.limitMoveValue]
  • TVI1 - index.TradeVolumeIndex. [taSdkSettings.source1, taSdkSettings.minTickValue]
  • SRL1 - LineStudy.SpeedResistanceLines. [taSdkSettings.startPeriod, taSdkSettings.endPeriod]
  • FBC1 - LineStudy.Fibonacci. [taSdkSettings.startPeriod, taSdkSettings.endPeriod]
  • QRL1 - LineStudy.QuadrantLines. [taSdkSettings.startPeriod, taSdkSettings.endPeriod]
  • TRL1 - LineStudy.TironeLevel. [taSdkSettings.startPeriod, taSdkSettings.endPeriod]
  • TLP1 - LineStudy.TrendLinePenetration. [taSdkSettings.source1, taSdkSettings.trendStartPeriod, taSdkSettings.trendStartValue, taSdkSettings.trendEndPeriod, taSdkSettings.trendEndValue]
  • ARO1 - Oscillator.Aroon. [taSdkSettings.periods]
  • CHV1 - Oscillator.ChaikinVolatility. [taSdkSettings.periods, taSdkSettings.ROC, taSdkSettings.ind1]
  • CMOSC1 - Oscillator.ChandeMomentumOscillator. [taSdkSettings.source1, taSdkSettings.periods]
  • DPOSC1 - Oscillator.DetrendedPriceOscillator. [taSdkSettings.source1, taSdkSettings.periods, taSdkSettings.ind1]
  • DMS1 - Oscillator.DirectionalMovementSystem. [taSdkSettings.periods]
  • EOM1 - Oscillator.EaseOfMovement. [taSdkSettings.periods, taSdkSettings.ind1]
  • FCOSC1 - Oscillator.FractalChaosOscillator. [taSdkSettings.periods]
  • MACD - Oscillator.MACD. [taSdkSettings.signalPeriods, taSdkSettings.longCycle, taSdkSettings.shortCycle]
  • MACDH - Oscillator.MACDHistogram. [taSdkSettings.signalPeriods, taSdkSettings.longCycle, taSdkSettings.shortCycle]
  • MOMENTUM - Oscillator.Momentum. [taSdkSettings.source1, taSdkSettings.periods]
  • PSAR - Oscillator.ParabolicSAR. [taSdkSettings.minAF, taSdkSettings.maxAF]
  • POSC1 - Oscillator.PriceOscillator. [taSdkSettings.source1, taSdkSettings.longCycle, taSdkSettings.shortCycle, taSdkSettings.ind1]
  • PNOSC1 - Oscillator.PrimeNumberOscillator. [taSdkSettings.source1]
  • ROSC1 - Oscillator.RainbowOscillator. [taSdkSettings.source1, taSdkSettings.levels, taSdkSettings.ind1]
  • SOSC1 - Oscillator.StochasticOscillator. [taSdkSettings.kPeriods, taSdkSettings.kSlowlingPeriods, taSdkSettings.periods]
  • TRIX - Oscillator.TRIX. [taSdkSettings.source1, taSdkSettings.periods]
  • TR0 - Oscillator.TrueRange. []
  • UOSC1 - Oscillator.UltimateOscillator. [taSdkSettings.cycle1, taSdkSettings.cycle2, taSdkSettings.cycle3]
  • VHF1 - Oscillator.VerticalHorizontalFilter. [taSdkSettings.source1, taSdkSettings.periods]
  • VOSC1 - Oscillator.VolumeOscillator. [taSdkSettings.shortTerm, taSdkSettings.longTerm, taSdkSettings.pointsOrPercent]
  • WAD1 - Oscillator.WilliamsAccumulationDistribution. []
  • WPR1 - Oscillator.WilliamsPctR. [taSdkSettings.periods]
  • REGR1 - LinearRegression.Regression. [taSdkSettings.source1, taSdkSettings.periods]
  • TIMESF1 - LinearRegression.TimeSeriesForecast. [taSdkSettings.source1, taSdkSettings.periods]
  • NEURALNET - Neural Network indicator. [taSdkSettings.source1, taSdkSettings.periods, taSdkSettings.LearningRate, taSdkSettings.Epocs, taSdkSettings.PercentTrain]

taSdkSettings - Json Object that store specific Indicator parameters.


public class taSdkSettings
{
    //common

    //points to candle data 0:open, 1: high, 2: low, 3: close, 4: volume
    public int source = 0;
    public int source2 = 3;

    public int periods = 14;

    /*if (taSet.ind1Type ==0) { ind1 = IndicatorType.SimpleMovingAverage; }
    else if (taSet.ind1Type == 1) { ind1 = IndicatorType.ExponentialMovingAverage; }
    else if (taSet.ind1Type == 2) { ind1 = IndicatorType.TimeSeriesMovingAverage; }
    else if (taSet.ind1Type == 3) { ind1 = IndicatorType.TriangularMovingAverage; }
    else if (taSet.ind1Type == 4) { ind1 = IndicatorType.VariableMovingAverage; }
    else if (taSet.ind1Type == 5) { ind1 = IndicatorType.WeightedMovingAverage; }
    else if (taSet.ind1Type == 6) { ind1 = IndicatorType.VIDYA; }*/
    public int ind1Type = 0;
    public int ind2Type = 1;

    // moving special //VIDYA
    public double R2Scale = 0.5;

    // index special
    public int barHistory = 50;//HistoricalVolatility/HV1
    public int standardDeviations = 5;
    public int kPeriods = 10;//oscillator
    public int kSmooth = 5;
    public int kDoubleSmooth = 10;
    public int dPeriods = 24;//oscillator
    public double limitMoveValue = 5.5;
    public double minTickValue = 0.5;

    //line study spec
    public int startPeriod = 10;
    public int endPeriod = 10;
    public int trendStartPeriod = 10;
    public int trendStartValue = 1;
    public int trendEndPeriod = 20;
    public double trendEndValue = 0.23424;

    // oscillator spec
    public int ROC = 5;
    public int signalPeriods = 10;
    public int longCycle = 10;
    public int shortCycle = 5;
    public double minAF = 0.1;
    public double maxAF = 0.5;
    public int levels = 3;
    public int kSlowlingPeriods = 5;
    public int cycle1 = 10;
    public int cycle2 = 20;
    public int cycle3 = 30;
    public int shortTerm = 5;
    public int longTerm = 12;
    public int pointsOrPercent = 1;

    // Neural Network
    public double LearningRate = 1.5;
    public int Epocs = 500;
    public double PercentTrain = 0.5;
}