Skip to content

shigengyu/Bitmex.Net

 
 

Repository files navigation

Icon Bitmex.Net

Build status

Bitmex.Net.Client is a .Net wrapper for the Bitmex API as described on Bitmex. It includes all features the API provides using clear and readable C# objects including

  • Reading market info
  • Placing and managing orders
  • Reading balances and funds
  • Live updates using the websocket
  • Loading historical data

Additionally it adds some convenience features like:

  • Configurable rate limiting
  • Autmatic logging

Installation

Nuget version Nuget downloads

Available on NuGet:

PM> Install-Package Bitmex.Net.Client

To get started with Bitmex.Net.Client first you will need to get the library itself. The easiest way to do this is to install the package into your project using NuGet.

Getting started

To get started we have to add the Bitmex.Net.Client namespace: using Bitmex.Net.Client;.

Bitmex.Net.Client provides three clients to interact with the Bitmex API:

The BitmexClient provides all rest API calls.

The BitmexSocketClient provides functions to interact with the websocket provided by the Bitmex API.

The BitmexHistoricalTradesLoader provides ability to bulk load historical trading data from Bitmex public data endpoint

See examples here. Note that you have to add your own appconfig.json and set up connection to testnet or production Bitmex API:

{
  "testnet": {
    "key": "yourTestentKey",
    "secret": "yourTestentSecret"
  },
  "prod": {
    "key": "yourProdKey",
    "secret": "yourProdSecret"
  }  
}

If you think something is broken, something is missing or have any questions, please open an Issue

CryptoExchange.Net

Implementation is build upon the CryptoExchange.Net library, make sure to also check out the documentation on that: docs

Other CryptoExchange.Net implementations:


Bitfinex

Bittrex

Binance

CoinEx

Huobi

Kucoin

Kraken

Switcheo

Liquid

OKEx

Exante

Changelog

  • 1/28/2021

    • dependencies update
  • 1/26/2021

    • added milliseconds accuracy to start/end time filters
    • added auth in not auth methods for better rate limits
    • fix boolean values serialization
  • 1/18/2021

    • Wallet history fix
    • Fix typo at Get all price indices endpoint
  • 1/11/2021

    • base library update

Donations

Donations are greatly appreciated and a motivation to keep improving.

Btc: 14nuXrFEKTrvyhHWYW7RgRt4zVxBfwff5V
Eth: 0x7CD82F45b173891e36d68ea4311B8b13A11a3B4b

About

Open source .Net API wrapper for the web API and websockets API @BitMEX cryptocurrency exchange

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%