Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cs/ccxt/exchanges/bithumb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ public override object describe()
} },
} },
} },
{ "USDT", new Dictionary<string, object>() {
{ "limits", new Dictionary<string, object>() {
{ "cost", new Dictionary<string, object>() {
{ "min", null },
{ "max", null },
} },
} },
} },
} },
} },
{ "commonCurrencies", new Dictionary<string, object>() {
Expand Down
4 changes: 2 additions & 2 deletions cs/ccxt/ws/Exchange.WsBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public virtual void onError(WebSocketClient client, object error = null)
{
// var client = (WebSocketClient)client2;
var urlClient = (this.clients.ContainsKey(client.url)) ? this.clients[client.url] : null;
rejectFutures(urlClient, urlClient.error);
if (urlClient != null && urlClient.error)
rejectFutures(urlClient, error);
if (urlClient != null) // && urlClient.error
{
// this.clients.Remove(client.url);
this.clients.TryRemove(client.url, out _);
Expand Down
19 changes: 18 additions & 1 deletion cs/ccxt/ws/Future.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,24 @@ public void resolve(object data = null)

public void reject(object data)
{
var exception = (data is Exception) ? data as System.Exception : new Exception(data.ToString());
// var callSite = new System.Diagnostics.StackTrace(1, true).GetFrame(0);
// var msg = (callSite?.GetFileName() ?? "Unknown" ) + " " + (callSite?.GetFileLineNumber() ?? 0) + " " + (callSite?.GetMethod()?.Name ?? "Unknown");
// System.Diagnostics.Debug.WriteLine($"Future.reject called with: {data} (Type: {data?.GetType().Name ?? "null"})" + " ::: " + msg);

Exception exception;

if (data is Exception ex)
{
exception = ex;
}
else if (data == null)
{
exception = new Exception("Future rejected with null data");
}
else
{
exception = new Exception($"Future rejected: {data?.ToString() ?? "null"} (Type: {data?.GetType().Name ?? "null"})\n");
}
this.tcs.SetException(exception);
// this.tcs = new TaskCompletionSource<object>(); // reset
// this.task = this.tcs.Task;
Expand Down
8 changes: 8 additions & 0 deletions dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -66486,6 +66486,14 @@ class bithumb extends _abstract_bithumb_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
},
},
},
'USDT': {
'limits': {
'cost': {
'min': undefined,
'max': undefined,
},
},
},
},
},
'commonCurrencies': {
Expand Down
2 changes: 1 addition & 1 deletion dist/ccxt.browser.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dist/cjs/src/bithumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ class bithumb extends bithumb$1["default"] {
},
},
},
'USDT': {
'limits': {
'cost': {
'min': undefined,
'max': undefined,
},
},
},
},
},
'commonCurrencies': {
Expand Down
54 changes: 31 additions & 23 deletions go/v4/bithumb.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ func (this *bithumb) Describe() interface{} {
},
},
},
"USDT": map[string]interface{}{
"limits": map[string]interface{}{
"cost": map[string]interface{}{
"min": nil,
"max": nil,
},
},
},
},
},
"commonCurrencies": map[string]interface{}{
Expand Down Expand Up @@ -402,8 +410,8 @@ func (this *bithumb) FetchBalance(optionalArgs ...interface{}) <-chan interface{
params := GetArg(optionalArgs, 0, map[string]interface{}{})
_ = params

retRes4458 := (<-this.LoadMarkets())
PanicOnError(retRes4458)
retRes4538 := (<-this.LoadMarkets())
PanicOnError(retRes4538)
var request interface{} = map[string]interface{}{
"currency": "ALL",
}
Expand Down Expand Up @@ -438,8 +446,8 @@ func (this *bithumb) FetchOrderBook(symbol interface{}, optionalArgs ...interfac
params := GetArg(optionalArgs, 1, map[string]interface{}{})
_ = params

retRes4648 := (<-this.LoadMarkets())
PanicOnError(retRes4648)
retRes4728 := (<-this.LoadMarkets())
PanicOnError(retRes4728)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"baseId": GetValue(market, "baseId"),
Expand Down Expand Up @@ -550,8 +558,8 @@ func (this *bithumb) FetchTickers(optionalArgs ...interface{}) <-chan interface{
params := GetArg(optionalArgs, 1, map[string]interface{}{})
_ = params

retRes5588 := (<-this.LoadMarkets())
PanicOnError(retRes5588)
retRes5668 := (<-this.LoadMarkets())
PanicOnError(retRes5668)
var result interface{} = map[string]interface{}{}
var quoteCurrencies interface{} = this.SafeDict(this.Options, "quoteCurrencies", map[string]interface{}{})
var quotes interface{} = ObjectKeys(quoteCurrencies)
Expand Down Expand Up @@ -628,8 +636,8 @@ func (this *bithumb) FetchTicker(symbol interface{}, optionalArgs ...interface{}
params := GetArg(optionalArgs, 0, map[string]interface{}{})
_ = params

retRes6218 := (<-this.LoadMarkets())
PanicOnError(retRes6218)
retRes6298 := (<-this.LoadMarkets())
PanicOnError(retRes6298)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"baseId": GetValue(market, "baseId"),
Expand Down Expand Up @@ -707,8 +715,8 @@ func (this *bithumb) FetchOHLCV(symbol interface{}, optionalArgs ...interface{})
params := GetArg(optionalArgs, 3, map[string]interface{}{})
_ = params

retRes6858 := (<-this.LoadMarkets())
PanicOnError(retRes6858)
retRes6938 := (<-this.LoadMarkets())
PanicOnError(retRes6938)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"baseId": GetValue(market, "baseId"),
Expand Down Expand Up @@ -852,8 +860,8 @@ func (this *bithumb) FetchTrades(symbol interface{}, optionalArgs ...interface{}
params := GetArg(optionalArgs, 2, map[string]interface{}{})
_ = params

retRes8108 := (<-this.LoadMarkets())
PanicOnError(retRes8108)
retRes8188 := (<-this.LoadMarkets())
PanicOnError(retRes8188)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"baseId": GetValue(market, "baseId"),
Expand Down Expand Up @@ -913,8 +921,8 @@ func (this *bithumb) CreateOrder(symbol interface{}, typeVar interface{}, side i
params := GetArg(optionalArgs, 1, map[string]interface{}{})
_ = params

retRes8548 := (<-this.LoadMarkets())
PanicOnError(retRes8548)
retRes8628 := (<-this.LoadMarkets())
PanicOnError(retRes8628)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"order_currency": GetValue(market, "id"),
Expand Down Expand Up @@ -972,8 +980,8 @@ func (this *bithumb) FetchOrder(id interface{}, optionalArgs ...interface{}) <-c
panic(ArgumentsRequired(Add(this.Id, " fetchOrder() requires a symbol argument")))
}

retRes8968 := (<-this.LoadMarkets())
PanicOnError(retRes8968)
retRes9048 := (<-this.LoadMarkets())
PanicOnError(retRes9048)
var market interface{} = this.Market(symbol)
var request interface{} = map[string]interface{}{
"order_id": id,
Expand Down Expand Up @@ -1157,8 +1165,8 @@ func (this *bithumb) FetchOpenOrders(optionalArgs ...interface{}) <-chan interfa
panic(ArgumentsRequired(Add(this.Id, " fetchOpenOrders() requires a symbol argument")))
}

retRes10588 := (<-this.LoadMarkets())
PanicOnError(retRes10588)
retRes10668 := (<-this.LoadMarkets())
PanicOnError(retRes10668)
var market interface{} = this.Market(symbol)
if IsTrue(IsEqual(limit, nil)) {
limit = 100
Expand Down Expand Up @@ -1264,9 +1272,9 @@ func (this *bithumb) CancelUnifiedOrder(order interface{}, optionalArgs ...inter
"side": GetValue(order, "side"),
}

retRes113615 := (<-this.CancelOrder(GetValue(order, "id"), GetValue(order, "symbol"), this.Extend(request, params)))
PanicOnError(retRes113615)
ch <- retRes113615
retRes114415 := (<-this.CancelOrder(GetValue(order, "id"), GetValue(order, "symbol"), this.Extend(request, params)))
PanicOnError(retRes114415)
ch <- retRes114415
return nil

}()
Expand Down Expand Up @@ -1299,8 +1307,8 @@ func (this *bithumb) Withdraw(code interface{}, amount interface{}, address inte
params = GetValue(tagparamsVariable, 1)
this.CheckAddress(address)

retRes11548 := (<-this.LoadMarkets())
PanicOnError(retRes11548)
retRes11628 := (<-this.LoadMarkets())
PanicOnError(retRes11628)
var currency interface{} = this.Currency(code)
var request interface{} = map[string]interface{}{
"units": amount,
Expand Down
8 changes: 8 additions & 0 deletions js/src/bithumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ export default class bithumb extends Exchange {
},
},
},
'USDT': {
'limits': {
'cost': {
'min': undefined,
'max': undefined,
},
},
},
},
},
'commonCurrencies': {
Expand Down
8 changes: 8 additions & 0 deletions php/async/bithumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ public function describe(): mixed {
),
),
),
'USDT' => array(
'limits' => array(
'cost' => array(
'min' => null,
'max' => null,
),
),
),
),
),
'commonCurrencies' => array(
Expand Down
8 changes: 8 additions & 0 deletions php/bithumb.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions python/ccxt/async_support/bithumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ def describe(self) -> Any:
},
},
},
'USDT': {
'limits': {
'cost': {
'min': None,
'max': None,
},
},
},
},
},
'commonCurrencies': {
Expand Down
8 changes: 8 additions & 0 deletions python/ccxt/bithumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@ def describe(self) -> Any:
},
},
},
'USDT': {
'limits': {
'cost': {
'min': None,
'max': None,
},
},
},
},
},
'commonCurrencies': {
Expand Down
8 changes: 8 additions & 0 deletions ts/src/bithumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ export default class bithumb extends Exchange {
},
},
},
'USDT': {
'limits': {
'cost': {
'min': undefined,
'max': undefined,
},
},
},
},
},
'commonCurrencies': {
Expand Down
11 changes: 11 additions & 0 deletions ts/src/test/static/currencies/bithumb.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,16 @@
"deposit": {},
"withdraw": {}
}
},
"USDT": {
"id": "USDT",
"code": "USDT",
"precision": 4,
"fees": {},
"networks": {},
"limits": {
"deposit": {},
"withdraw": {}
}
}
}
43 changes: 42 additions & 1 deletion ts/src/test/static/markets/bithumb.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,46 @@
"fluctate_24H": "-985000",
"fluctate_rate_24H": "-1.21"
}
},
"BTC/USDT": {
"id": "BTC",
"symbol": "BTC/USDT",
"base": "BTC",
"quote": "USDT",
"baseId": "BTC",
"quoteId": "USDT",
"type": "spot",
"spot": true,
"margin": false,
"swap": false,
"future": false,
"option": false,
"active": true,
"contract": false,
"taker": 0.0025,
"maker": 0.0025,
"precision": {
"amount": 4,
"price": 4
},
"limits": {
"leverage": {},
"amount": {},
"price": {},
"cost": {}
},
"info": {
"opening_price": "120852.73",
"closing_price": "121702.55",
"min_price": "120678.15",
"max_price": "121807.69",
"units_traded": "1.463081",
"acc_trade_value": "177551.30118934",
"prev_closing_price": "120900",
"units_traded_24H": "13.8674",
"acc_trade_value_24H": "1669792.6252954",
"fluctate_24H": "2099.48",
"fluctate_rate_24H": "1.76"
}
}
}
}
Loading