Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fremantle-industries/ex_bitmex
BitMEX API Client for Elixir
https://github.com/fremantle-industries/ex_bitmex
algorithmic-trading automated-trading bitcoin bitmex crypto crypto-trader elixir fintech hft hft-trading quant trading trading-bot trading-systems
Last synced: 3 months ago
JSON representation
BitMEX API Client for Elixir
- Host: GitHub
- URL: https://github.com/fremantle-industries/ex_bitmex
- Owner: fremantle-industries
- License: mit
- Created: 2018-11-30T20:39:15.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-03-20T01:17:00.000Z (almost 2 years ago)
- Last Synced: 2024-03-14T21:24:02.577Z (11 months ago)
- Topics: algorithmic-trading, automated-trading, bitcoin, bitmex, crypto, crypto-trader, elixir, fintech, hft, hft-trading, quant, trading, trading-bot, trading-systems
- Language: Elixir
- Homepage:
- Size: 413 KB
- Stars: 15
- Watchers: 3
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExBitmex
[![Build Status](https://github.com/fremantle-capital/ex_bitmex/workflows/Test/badge.svg?branch=master)](https://github.com/fremantle-capital/ex_bitmex/actions?query=workflow%3ATest)
[![Coverage Status](https://coveralls.io/repos/github/fremantle-capital/ex_bitmex/badge.svg?branch=master)](https://coveralls.io/github/fremantle-capital/ex_bitmex?branch=master)
[![hex.pm version](https://img.shields.io/hexpm/v/ex_bitmex.svg?style=flat)](https://hex.pm/packages/ex_bitmex)BitMEX API Client for Elixir
## Installation
Add the `ex_bitmex` package to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:ex_bitmex, "~> 0.6"}]
end
```## Usage
```elixir
# Public
{:ok, instruments, rate_limit} = ExBitmex.Rest.Instrument.Index.get(start: 0, count: 20)# Private
credentials = %ExBitmex.Credentials{
api_key: System.get_env("BITMEX_API_KEY"),
api_secret: System.get_env("BITMEX_API_SECRET")
}{:ok, positions, rate_limit} = ExBitmex.Rest.Position.Index.get(credentials)
```## WebSocket
Create a WebSocket wrapper with a handler
```elixir
defmodule BitMexWebSocketWrapper do
use ExBitmex.WebSocketdef handle_response(json, _state) do
Logger.warn("Received #{inspect(json)}")
end
end
```## REST Status
#### Announcement
- [ ] `GET /announcement`
- [ ] `GET /announcement/urgent`#### APIKey
- [ ] `GET /apiKey`
#### Chat
- [ ] `GET /chat`
- [ ] `POST /chat`
- [ ] `GET /chat/channels`
- [ ] `GET /chat/connected`#### Execution
- [ ] `GET /execution`
- [ ] `GET /execution/tradeHistory`#### Funding
- [x] `GET /funding`
#### GlobalNotification
- [ ] `GET /globalNotification`
#### Instrument
- [x] `GET /instrument`
- [x] `GET /instrument/active`
- [x] `GET /instrument/activeAndIndices`
- [x] `GET /instrument/activeIntervals`
- [x] `GET /instrument/compositeIndex`
- [x] `GET /instrument/indicies`#### Insurance
- [ ] `GET /insurance`
#### Leaderboard
- [ ] `GET /leaderboard`
- [ ] `GET /leaderboard/name`#### Liquidation
- [ ] `GET /liquidation`
#### Order
- [ ] `GET /order`
- [x] `PUT /order`
- [x] `POST /order`
- [x] `DELETE /order`
- [x] `DELETE /order/all`
- [x] `PUT /order/bulk`
- [ ] `POST /order/bulk`
- [ ] `POST /order/cancelAllAfter`
- [ ] `POST /order/closePosition`#### OrderBook
- [ ] `GET /orderBook/L2`
#### Position
- [x] `GET /position`
- [ ] `POST /position/isolate`
- [ ] `POST /position/leverage`
- [ ] `POST /position/riskLimit`
- [ ] `POST /position/transferMargin`#### Quote
- [ ] `GET /quote`
- [ ] `GET /quote/bucketed`#### Schema
- [ ] `GET /schema`
- [ ] `GET /schema/websocketHelp`#### Settlement
- [ ] `GET /settlement`
#### Stats
- [ ] `GET /stats`
- [ ] `GET /stats/history`
- [ ] `GET /stats/historyUSD`#### Trade
- [x] `GET /trade`
- [ ] `GET /trade/bucketed`#### User
- [x] `GET /user`
- [x] `GET /user/affiliateStatus`
- [ ] `POST /user/cancelWithdrawal`
- [ ] `GET /user/checkReferralCode`
- [x] `GET /user/commmission`
- [ ] `POST /user/communicationToken`
- [ ] `POST /user/confirmEmail`
- [ ] `POST /user/confirmWithdrawal`
- [ ] `GET /user/depositAddress`
- [ ] `GET /user/executionHistory`
- [ ] `POST /user/logout`
- [x] `GET /user/margin`
- [ ] `GET /user/minWithdrawalFee`
- [ ] `POST /user/preferences`
- [ ] `GET /user/quoteFillRatio`
- [ ] `POST /user/requestWithdrawal`
- [x] `GET /user/wallet`
- [x] `GET /user/walletHistory`
- [ ] `GET /user/walletSummary`#### UserEvent
- [ ] `GET /userEvent`