-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added client side ratelimiter implementation Updated REST and WebSocket unit tests Updated REST requests to new CryptoExchange.Net implementation Updated various response models Fixed restClient.FuturesApi.Trading.CancelOrderByClientOrderIdAsync response model Fixed restClient.FuturesApi.Trading.CancelStopOrderByClientOrderIdAsync response model Fixed restClient.SpotApi.Account.GetCreditAccountAsync response model Fixed restClient.SpotApi.Account.GetWithdrawalHistoryAsync status parameter Removed V1 API
- Loading branch information
Showing
248 changed files
with
3,830 additions
and
7,485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
CoinEx.Net.UnitTests/Endpoints/FuturesApi/Account/GetBalances.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
GET | ||
/v2/assets/futures/balance | ||
true | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"ccy": "CET", | ||
"available": "45945.5263788804", | ||
"frozen": "50634.82448865128", | ||
"margin": "36407.5334622699", | ||
"unrealized_pnl": "18957.427858971438", | ||
"transferrable": "14265.938812991284" | ||
} | ||
], | ||
"message": "OK" | ||
} |
11 changes: 11 additions & 0 deletions
11
CoinEx.Net.UnitTests/Endpoints/FuturesApi/Account/SetLeverage.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
POST | ||
/v2/futures/adjust-position-leverage | ||
true | ||
{ | ||
"code": 0, | ||
"data": { | ||
"margin_mode": "cross", | ||
"leverage": 10 | ||
}, | ||
"message": "OK" | ||
} |
19 changes: 19 additions & 0 deletions
19
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetBasisHistory.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
GET | ||
/v2/futures/basis-history | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "LATUSDT", | ||
"created_at": 1642145400000, | ||
"basis_rate": "-0.00027732" | ||
}, | ||
{ | ||
"market": "LATUSDT", | ||
"created_at": 1642146000000, | ||
"basis_rate": "-0.00013372" | ||
} | ||
], | ||
"message": "OK" | ||
} |
24 changes: 24 additions & 0 deletions
24
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetFundingRateHistory.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
GET | ||
/v2/futures/funding-rate-history | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "LATUSDT", | ||
"funding_time": 1642145331234, | ||
"theoretical_funding_rate": "-0.00007488", | ||
"actual_funding_rate": "-0.00027732" | ||
}, | ||
{ | ||
"market": "ELONUSDT", | ||
"funding_time": 1642145331234, | ||
"theoretical_funding_rate": "-0.00003688", | ||
"actual_funding_rate": "-0.00013372" | ||
} | ||
], | ||
"pagination": { | ||
"has_next": false | ||
}, | ||
"message": "OK" | ||
} |
29 changes: 29 additions & 0 deletions
29
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetFundingRates.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
GET | ||
/v2/futures/funding-rate | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "LATUSDT", | ||
"mark_price": "0.008157", | ||
"latest_funding_rate": "-0.00007488", | ||
"next_funding_rate": "-0.00027732", | ||
"max_funding_rate": "0.00375", | ||
"min_funding_rate": "-0.00375", | ||
"latest_funding_time": 1642145331234, | ||
"next_funding_time": 1642231731234 | ||
}, | ||
{ | ||
"market": "ELONUSDT", | ||
"mark_price": "0.000000152823", | ||
"latest_funding_rate": "-0.00003688", | ||
"next_funding_rate": "-0.00013372", | ||
"max_funding_rate": "0.00375", | ||
"min_funding_rate": "-0.00375", | ||
"latest_funding_time": 1642145331234, | ||
"next_funding_time": 1642231731234 | ||
} | ||
], | ||
"message": "OK" | ||
} |
36 changes: 36 additions & 0 deletions
36
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetIndexPrices.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
GET | ||
/v2/futures/index | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "BTCUSDT", | ||
"created_at": 1703561120000, | ||
"price": "30718.42", | ||
"sources": [ | ||
{ | ||
"created_at": 1703561102173, | ||
"exchange" : "binance", | ||
"index_weight": "0.25" | ||
}, | ||
{ | ||
"created_at": 1703561124859, | ||
"exchange": "coinex", | ||
"index_weight": "0.25" | ||
}, | ||
{ | ||
"created_at": 1703561123704, | ||
"exchange": " meexc", | ||
"index_weight": "0.25" | ||
}, | ||
{ | ||
"created_at": 1703561125040, | ||
"exchange": "bybit ", | ||
"index_weight": "0.25" | ||
} | ||
] | ||
} | ||
], | ||
"message": "OK " | ||
} |
19 changes: 19 additions & 0 deletions
19
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetKlines.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
GET | ||
/v2/futures/kline | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "LATUSDT", | ||
"created_at": 17017617600000, | ||
"open": "0.008286", | ||
"close": "0.008157", | ||
"high": "0.008390", | ||
"low": "0.008106", | ||
"volume": "807714.49139758", | ||
"value": "6689.21644207" | ||
} | ||
], | ||
"message" : "OK" | ||
} |
28 changes: 28 additions & 0 deletions
28
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetLiquidationHistory.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
GET | ||
/v2/futures/liquidation-history | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": " LATUSDT", | ||
"side": "long", | ||
"liq_price": "0.009061", | ||
"liq_amount": "184378262", | ||
"bkr_price": "0.009038", | ||
"created_at": 1691482451000 | ||
}, | ||
{ | ||
"market": " LATUSDT", | ||
"side": "long", | ||
"liq_price": "0.009030", | ||
"liq_amount": "375947238", | ||
"bkr_price": "0.009016", | ||
"created_at": 1691482829000 | ||
} | ||
], | ||
"pagination": { | ||
"has_next": false | ||
}, | ||
"message": "OK" | ||
} |
44 changes: 44 additions & 0 deletions
44
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetOrderBook.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
GET | ||
/v2/futures/depth | ||
false | ||
{ | ||
"code": 0, | ||
"data": { | ||
"market": "BTCUSDT", | ||
"is_full": true, | ||
"depth": { | ||
"asks": [ | ||
[ | ||
"30740.00", | ||
"0.31763545" | ||
], | ||
[ | ||
"30769.00", | ||
"1.45155000" | ||
] | ||
], | ||
"bids": [ | ||
[ | ||
"30736.00", | ||
"0.04857373" | ||
], | ||
[ | ||
"30733.00", | ||
"0.84696320" | ||
], | ||
[ | ||
"30725.00", | ||
"0.12563353" | ||
], | ||
[ | ||
"30422.00", | ||
"0" | ||
] | ||
], | ||
"last": "30746.28", | ||
"updated_at": 1689152421692, | ||
"checksum": 2578768879 | ||
} | ||
}, | ||
"message": "OK" | ||
} |
20 changes: 20 additions & 0 deletions
20
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetPositionLevels.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
GET | ||
/v2/futures/position-level | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "BTCUSDT", | ||
"level": [ | ||
{"amount": "20", "leverage": "100", "maintenance_margin_rate": "0.005", "min_initial_margin_rate": "0.01"}, | ||
{"amount": "50", "leverage": "50", "maintenance_margin_rate": "0.01", "min_initial_margin_rate": "0.02"}, | ||
{"amount": "100", "leverage": "30", "maintenance_margin_rate": "0.015", "min_initial_margin_rate": "0.0333"}, | ||
{"amount": "200", "leverage": "20", "maintenance_margin_rate": "0.02", "min_initial_margin_rate": "0.05"}, | ||
{"amount": "500", "leverage": "15", "maintenance_margin_rate": "0.025", "min_initial_margin_rate": "0.06"}, | ||
{"amount": "1000", "leverage": "10", "maintenance_margin_rate": "0.03", "min_initial_margin_rate": "0.1"} | ||
] | ||
} | ||
], | ||
"message": "OK" | ||
} |
19 changes: 19 additions & 0 deletions
19
CoinEx.Net.UnitTests/Endpoints/FuturesApi/ExchangeData/GetPremiumIndexPriceHistory.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
GET | ||
/v2/futures/premium-index-history | ||
false | ||
{ | ||
"code": 0, | ||
"data": [ | ||
{ | ||
"market": "LATUSDT", | ||
"created_at": 1642145400000, | ||
"premium_index": "-0.00027732" | ||
}, | ||
{ | ||
"market": "LATUSDT", | ||
"created_at": 1642146000000, | ||
"premium_index": "-0.00013372" | ||
} | ||
], | ||
"message": "OK" | ||
} |
Oops, something went wrong.