Skip to content

Commit

Permalink
Added gate.io orders to resolve #1108.
Browse files Browse the repository at this point in the history
████ ███  To request new features or in case this commit breaks something for you,
████ ███  please, create a new github issue with all possible information for me,
▓███▀█▄   but never share your API Keys!
▒▓██ ███
░▒▓█ ███  Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
 _______________________________
/ Hello, WORLD!                 \
|                               |
\ pssst.. 1 BTC = 30668.79 EUR. /
 -------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
  • Loading branch information
ctubio committed Jun 2, 2021
1 parent 03fa4f8 commit fcc0f91
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ K ?= K.sh
MAJOR = 0
MINOR = 6
PATCH = 1
BUILD = 33
BUILD = 34

OBLIGATORY = DISCLAIMER: This is strict non-violent software: \n$\
if you hurt other living creatures, please stop; \n$\
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The web UI is compatible with most web browsers/devices/resolutions, but Firefox
||with Post-Only Orders support|without Post-Only|
|---|---|---|
|**without Maker fees**|[BitMEX](https://www.bitmex.com/) <sub>([fees](https://www.bitmex.com/app/fees))</sub><br> &#10239; _REST + WebSocket_|*none*|
|**with Maker and Taker fees**|[Coinbase](https://pro.coinbase.com/) <sub>([fees](https://pro.coinbase.com/orders/fees))</sub><br> &#10239; _REST + WebSocket + FIX_<br><br>[Binance](https://www.binance.com/) <sub>([fees](https://www.binance.com/en/fee/schedule))</sub><br> &#10239; _REST + WebSocket_<br><br>[Kraken](https://www.kraken.com/) <sub>([fees](https://www.kraken.com/features/fee-schedule))</sub><br> &#10239; _REST + WebSocket²_<br><br>[KuCoin](https://www.kucoin.com/) <sub>([fees](https://www.kucoin.com/vip/level))</sub><br> &#10239; _REST + WebSocket_<br><br>[Bitfinex](https://www.bitfinex.com/) <sub>([fees](https://www.bitfinex.com/fees))</sub><br>[Ethfinex](https://www.ethfinex.com/) <sub>([fees](https://www.ethfinex.com/fees))</sub><br> &#10239; _REST + WebSocket_<br><br>[HitBTC](https://hitbtc.com/) <sub>([fees](https://hitbtc.com/fee-tier))</sub><br>[Bequant](https://bequant.io/) <sub>([fees](https://bequant.io/fees-and-limits))</sub><br> &#10239; _REST + WebSocket²_<br><br>[Poloniex](https://www.poloniex.com/) <sub>([fees](https://poloniex.com/fees/))</sub><br> &#10239; _REST + WebSocket_|*none*|
|**with Maker and Taker fees**|[Coinbase](https://pro.coinbase.com/) <sub>([fees](https://pro.coinbase.com/orders/fees))</sub><br> &#10239; _REST + WebSocket + FIX_<br><br>[Binance](https://www.binance.com/) <sub>([fees](https://www.binance.com/en/fee/schedule))</sub><br> &#10239; _REST + WebSocket_<br><br>[Kraken](https://www.kraken.com/) <sub>([fees](https://www.kraken.com/features/fee-schedule))</sub><br> &#10239; _REST + WebSocket²_<br><br>[KuCoin](https://www.kucoin.com/) <sub>([fees](https://www.kucoin.com/vip/level))</sub><br> &#10239; _REST + WebSocket_<br><br>[Bitfinex](https://www.bitfinex.com/) <sub>([fees](https://www.bitfinex.com/fees))</sub><br>[Ethfinex](https://www.ethfinex.com/) <sub>([fees](https://www.ethfinex.com/fees))</sub><br> &#10239; _REST + WebSocket_<br><br>[Gate.io](https://www.gate.io/) <sub>([fees](https://www.gate.io/fee))</sub><br> &#10239; _REST + WebSocket_<br><br>[HitBTC](https://hitbtc.com/) <sub>([fees](https://hitbtc.com/fee-tier))</sub><br>[Bequant](https://bequant.io/) <sub>([fees](https://bequant.io/fees-and-limits))</sub><br> &#10239; _REST + WebSocket²_<br><br>[Poloniex](https://www.poloniex.com/) <sub>([fees](https://poloniex.com/fees/))</sub><br> &#10239; _REST + WebSocket_|*none*|

All currency pairs are supported.

Expand Down Expand Up @@ -258,7 +258,7 @@ ws sandbox: [websocket.org](https://www.websocket.org/echo.html)

Added Hello World bot and Scaling bot.

Added Binance, Kraken, KuCoin and BitMEX API.
Added Binance, Kraken, KuCoin, Gate.io and BitMEX API.

</details>

Expand Down
2 changes: 1 addition & 1 deletion etc/K.sh.dist
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ OPTIONAL_ARGUMENTS="--colors --naked --debug-wallet"
#API_EXCHANGE=KUCOIN
#API_EXCHANGE=BITFINEX
#API_EXCHANGE=ETHFINEX
#API_EXCHANGE=GATEIO (under development)
#API_EXCHANGE=GATEIO
#API_EXCHANGE=HITBTC
#API_EXCHANGE=BEQUANT
#API_EXCHANGE=POLONIEX
Expand Down
2 changes: 1 addition & 1 deletion src/bin/trading-bot/trading-bot.data.h
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ namespace tribeca {
return sum;
};
void expire(multimap<Price, RecentTrade> *const k) {
Clock now = Tstamp;
const Clock now = Tstamp;
for (auto it = k->begin(); it != k->end();)
if (it->second.time + qp.tradeRateSeconds * 1e+3 > now) ++it;
else it = k->erase(it);
Expand Down
4 changes: 3 additions & 1 deletion src/lib/Krypto.ninja-apis.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,13 +769,15 @@ namespace ₿ {
{ "reply", reply }
};
};
json xfer(const string &url, const string &h1, const string &h2, const string &h3, const string &crud) const {
json xfer(const string &url, const string &h1, const string &h2, const string &h3, const string &post, const string &crud) const {
return Curl::Web::xfer(url, [&](CURL *curl) {
struct curl_slist *h_ = nullptr;
h_ = curl_slist_append(h_, "Content-Type: application/json");
h_ = curl_slist_append(h_, ("KEY: " + h1).data());
h_ = curl_slist_append(h_, ("Timestamp: " + h2).data());
h_ = curl_slist_append(h_, ("SIGN: " + h3).data());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, h_);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post.data());
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, crud.data());
});
};
Expand Down

0 comments on commit fcc0f91

Please sign in to comment.