• Yes, requires OpenSSL
  • No, only Blocking mode
  • Yes, Requires Win8.+

Bittrex WebSocket API

From sgcWebSockets 4.1.7, Bittrex WebSocket API is supported.

 

The Bittrex Websocket API is implemented using SignalR.

Bittrex component has a property called Bittrex where you can fill API Keys provided by Bittrex to get access to your account data.

 

Authenticate

Verifies a user’s identity to the server and begins receiving account-level notifications.

Needs an ApiKey and ApiSecret, which can be obtained in Bittrex user page.

Updates are received OnBittrexMessage event, where Callback is "OrderDelta" or "BalanceDelta".

JSON Order Response

 

{

    AccountUuid : Guid,

    Nonce       : int,

    Type        : int,

    Order: 

    {

        Uuid              : guid,

        Id                : long,

        OrderUuid         : guid,

        Exchange          : string,

        OrderType         : string,

        Quantity          : decimal,

        QuantityRemaining : decimal,

        Limit             : decimal,

        CommissionPaid    : decimal,

        Price             : decimal,

        PricePerUnit      : decimal,

        Opened            : date,

        Closed            : date,

        IsOpen            : bool,

        CancelInitiated   : bool,

        ImmediateOrCancel : bool,

        IsConditional     : bool,

        Condition         : string,

        ConditionTarget   : decimal,

        Updated           : date

    }

}

 

JSON Balance Response

 

{

    Nonce : int,

    Delta : 

    {

        Uuid          : guid,

        AccountId     : int,

        Currency      : string,

        Balance       : decimal,

        Available     : decimal,

        Pending       : decimal,

        CryptoAddress : string,

        Requested     : bool,

        Updated       : date,

        AutoSell      : bool

    }

}

 

QueryExchangeState

Allows the caller to retrieve the full order book for a specific market. There is only one Parameter called MarketName, e.g. BTC-ETH

Updates are received OnBittrexMessage event, where Callback is "QueryExchangeState"

JSON Response

 

{

    MarketName : string,

    Nonce      : int,

    Buys: 

    [

        {

            Quantity : decimal,

            Rate     : decimal

        }

    ],

    Sells: 

    [

        {

            Quantity : decimal,

            Rate     : decimal

        }

    ],

    Fills: 

    [

        {

            Id        : int,

            TimeStamp : date,

            Quantity  : decimal,

            Price     : decimal,

            Total     : decimal,

            FillType  : string,

            OrderType : string

        }

    ]

}

 

QuerySummaryState

Allows the caller to retrieve the full state for all markets. 

Updates are received OnBittrexMessage event, where Callback is "QuerySummaryState"

JSON Response

 

{

    Nonce     : int,

    Summaries : 

    [

        {

            MarketName     : string,

            High           : decimal,

            Low            : decimal,

            Volume         : decimal,

            Last           : decimal,

            BaseVolume     : decimal,

            TimeStamp      : date,

            Bid            : decimal,

            Ask            : decimal,

            OpenBuyOrders  : int,

            OpenSellOrders : int,

            PrevDay        : decimal,

            Created        : date

        }

    ]

}

 

SubscribeToExchangeDeltas

Allows the caller to receive real-time updates to the state of a single market. There is only one Parameter called MarketName, e.g. BTC-ETH

If user is subscribed to the feed, OnBittrexSubscribed event will be raised.

Updates are received OnBittrexMessage event, where Callback is "MarketDelta"

JSON Response

 

{

    MarketName : string,

    Nonce      : int,

    Buys: 

    [

        {

            Type     : int,

            Rate     : decimal,

            Quantity : decimal

        }

    ],

    Sells: 

    [

        {

            Type     : int,

            Rate     : decimal,

            Quantity : decimal

        }

    ],

    Fills: 

    [

        {

            FillId    : int,

            OrderType : string,

            Rate      : decimal,

            Quantity  : decimal,

            TimeStamp : date

        }

    ]

}

 

SubscribeToSummaryDeltas

Allows the caller to receive real-time updates of the state of all markets. 

If user is subscribed to the feed, OnBittrexSubscribed event will be raised.

Updates are received OnBittrexMessage event, where Callback is "SummaryDelta"

JSON Response

 

{

    Nonce : int,

    Deltas : 

    [

        {

            MarketName     : string,

            High           : decimal,

            Low            : decimal,

            Volume         : decimal,

            Last           : decimal,

            BaseVolume     : decimal,

            TimeStamp      : date,

            Bid            : decimal,

            Ask            : decimal,

            OpenBuyOrders  : int,

            OpenSellOrders : int,

            PrevDay        : decimal,

            Created        : date

        }

    ]

}

 

SubscribeToSummaryLiteDeltas

Allows the caller to receive real-time updates of the state of all markets but only market name, the last price, and the base currency  

If user is subscribed to the feed, OnBittrexSubscribed event will be raised.

Updates are received OnBittrexMessage event, where Callback is "LiteSummaryDelta"

JSON Response

 

{

    Deltas : 

    [

        {

            MarketName : string,

            Last       : decimal,

            BaseVolume : decimal

        }

    ]

}