Skip to content

Commit

Permalink
Adding BingX connector.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robotter AI authored and danilo-silva-funttastic committed Nov 13, 2024
1 parent e689ac6 commit 3d72b33
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 21 deletions.
43 changes: 22 additions & 21 deletions docs/cex-connectors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@ See [Building Connectors](/developers/connectors) for more information.

Here are the current CEX connectors in the codebase:

| Exchange | Type | Spot Connector Standard | Perp Connector Standard | V2 Strategies Compatible | Connector Guide
|----------|------|------|------------|-------------|---|
| [Binance](../exchanges/binance/index.md) | CLOB | v2.1 | v2.1 | Yes | [Guide](/academy-content/using-binance-with-hummingbot)
| [Gate.io](../exchanges/gate-io/index.md) | CLOB | v2.1 | v2.1 | Yes
| [Kucoin](../exchanges/kucoin/index.md) | CLOB | v2.1 | v2.1 | Yes
| [HTX](../exchanges/huobi) | CLOB | v2.0 | | No - market order type not supported
| [AscendEx](../exchanges/ascendex/index.md) | CLOB | v2.0 | | Yes - spot only
| [OKX](../exchanges/okx/okx.md) | CLOB | v2.1 | | Yes
| [Coinbase](../exchanges/coinbase) | CLOB | v2.1 | | Yes
| [Kraken](../exchanges/kraken) | CLOB | v1.0 | | No
| [BTC Markets](../exchanges/btc-markets.md) | CLOB | v2.0 | | Yes - spot only
| [FoxBit](../exchanges/foxbit) | CLOB | v2.0 | | Yes - spot only
| Exchange | Type | Spot Connector Standard | Perp Connector Standard | V2 Strategies Compatible | Connector Guide
|-------------------------------------------------|------|------|--------|-------------|---|
| [Binance](../exchanges/binance/index.md) | CLOB | v2.1 | v2.1 | Yes | [Guide](/academy-content/using-binance-with-hummingbot)
| [Gate.io](../exchanges/gate-io/index.md) | CLOB | v2.1 | v2.1 | Yes
| [Kucoin](../exchanges/kucoin/index.md) | CLOB | v2.1 | v2.1 | Yes
| [HTX](../exchanges/huobi) | CLOB | v2.0 | | No - market order type not supported
| [AscendEx](../exchanges/ascendex/index.md) | CLOB | v2.0 | | Yes - spot only
| [OKX](../exchanges/okx/okx.md) | CLOB | v2.1 | | Yes
| [Coinbase](../exchanges/coinbase) | CLOB | v2.1 | | Yes
| [Kraken](../exchanges/kraken) | CLOB | v1.0 | | No
| [BTC Markets](../exchanges/btc-markets.md) | CLOB | v2.0 | | Yes - spot only
| [FoxBit](../exchanges/foxbit) | CLOB | v2.0 | | Yes - spot only
| [Hashkey Global](../exchanges/hashkey/index.md) | CLOB | v2.1 | v2.1 | Yes
| [Bitfinex](../exchanges/bitfinex.md) | CLOB | v1.0 | | no
| [Bitget](../exchanges/bitget-perpetual.md) | CLOB | | v2.0 | Yes - perp only
| [MEXC](../exchanges/mexc) | CLOB | v2.0 | | Yes - spot only |
| [Bybit](../exchanges/bybit) | CLOB | v2.1 | v2.1 | Yes - but API needs update to v5
| [Bitmart](../exchanges/bitmart/index.md) | CLOB | v2.1 | | Yes - spot only
| [NDAX](../exchanges/ndax) | CLOB | v1.0 | | No
| [Cube](../exchanges/cube/index.md) | CLOB | v2.1 | | Yes
| [Bitstamp](../exchanges/bitstamp/index.md) | CLOB | v2.1 | | Yes
| [Tegro](../exchanges/tegro/index.md) | CLOB | v2.1 | v2.1 | Yes
| [Bitfinex](../exchanges/bitfinex.md) | CLOB | v1.0 | | no
| [Bitget](../exchanges/bitget-perpetual.md) | CLOB | | v2.0 | Yes - perp only
| [MEXC](../exchanges/mexc) | CLOB | v2.0 | | Yes - spot only |
| [Bybit](../exchanges/bybit) | CLOB | v2.1 | v2.1 | Yes - but API needs update to v5
| [Bitmart](../exchanges/bitmart/index.md) | CLOB | v2.1 | | Yes - spot only
| [NDAX](../exchanges/ndax) | CLOB | v1.0 | | No
| [Cube](../exchanges/cube/index.md) | CLOB | v2.1 | | Yes
| [Bitstamp](../exchanges/bitstamp/index.md) | CLOB | v2.1 | | Yes
| [Tegro](../exchanges/tegro/index.md) | CLOB | v2.1 | v2.1 | Yes
| [BingX](../exchanges/bing_x/index.md) | CLOB | v2.1 | | Yes
Binary file added docs/exchanges/bing_x/bingx-api1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/exchanges/bing_x/bingx-api2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/exchanges/bing_x/bingx-api3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/exchanges/bing_x/bingx-api4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions docs/exchanges/bing_x/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
## 🛠 Connector Info

- **Exchange Type**: Centralized Exchange (CEX)
- **Market Type**: Central Limit Order Book (CLOB)

| Component | Status | Connector Version | V2 Strategies | Notes |
| --------- | ------ | ----------------- | ------------ | ----- |
| [🔀 Spot Connector](#spot-connector) | ✅ | v2.1 | Yes | Supports `MARKET` order type
| [🕯 Spot Candles Feed](#spot-candles-feed) | Not built |

## ℹ️ Exchange Info

- **Website**: <https://bingx.com/>
- **CoinGecko**: <https://www.coingecko.com/en/exchanges/bingx>
- **API Docs**: <https://bingx-api.github.io/docs/swap/>
- **Fees**: <https://bingx.com/support/costs/>
- **Unsupported Countries**:
- BingX does not accept certain customers. To maintain our strong reputation in the market and ensure a robust compliant marketplace, we have decided to not seek nor accept customers from certain jurisdictions, such as Canada, Mainland China, Hong Kong SAR, Macau SAR, Netherlands, Singapore, United States (including all US territories), United Kingdom, any country that is designated as a restricted country under BingX's AML/CTF policy and any other jurisdictions where the provision of the services is prohibited or will subject us to regulatory penalty ("Restricted Jurisdictions").

## 🔑 How to Connect

### Generate API Keys

1. Go to [BingX Exchange](https://bingx.com/) and log in or create a new account.

2. Complete your KYC if you haven't already and then open the API Key page by clicking over the profile icon in the top right corner and go to the API Management page at https://bingx.com/account/api/.

3. Click on the ***Create API*** button

![Create API](bingx-api1.png)

4. Write a label for your API Keys and then select the permission options that you want (enabling the withdrawal permission requires linking IP addresses on the box below) and click ***Confirm***

![API Permission](bingx-api2.png)

5. Enter your corresponding verification codes.

![Security Verification](bingx-api3.png)

6. Copy your API keys and store them somewhere safe.

![Get API Key](bingx-api4.png)

7. Now, you have created API keys for your BingX Exchange!

### Add Keys to Hummingbot

From inside the Hummingbot client, run `connect bing_x`:

```
>>> connect bing_x
Enter your BingX Exchange API key >>>
Enter your BingX Exchange secret key >>>
```

If connection is successful:

```
You are now connected to bing_x
```


## 🔀 Spot Connector
*Integration to spot markets API endpoints*

- **ID**: `bing_x`
- **Connection Type**: REST / WebSocket
- **Folder**: <https://github.com/hummingbot/hummingbot/tree/master/hummingbot/connector/exchange/bing_x>

### Order Types

This connector supports the following `OrderType` constants:

- `LIMIT`
- `MARKET`

0 comments on commit 3d72b33

Please sign in to comment.