-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename to HTX, updated to System.Text.Json and full library update (#115
) Renamed library from Huobi.Net to HTX.Net, following the renaming of the exchange Renamed all models and references to from Huobi... to HTX... Renamed UsdtMarginSwapApi to UsdtFuturesApi Renamed some endpoints to match standardized endpoint names Split Margin and SubAccount endpoints into separate topics in the rest SpotApi Split SubAccount endpoints into separate topics in the rest FuturesApi Added UsdtFuturesSymbolOrderBook implementation Added client side ratelimiting Added various missing endpoints Added Usdt Futures API account websocket streams Updated from Newtonsoft.Json to System.Text.Json for json handling Updated code xml comments Updated API documentation references Fixed a large number of bugs
- Loading branch information
Showing
747 changed files
with
43,850 additions
and
20,302 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
HTX.Net.UnitTests/Endpoints/Spot/Account/CancelWithdrawal.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,6 @@ | ||
POST | ||
/v1/dw/withdraw-virtual/1/cancel | ||
true | ||
{ | ||
"data": 700 | ||
} |
29 changes: 29 additions & 0 deletions
29
HTX.Net.UnitTests/Endpoints/Spot/Account/GetAccountHistory.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 | ||
/v1/account/history | ||
true | ||
{ | ||
"status": "ok", | ||
"data": [ | ||
{ | ||
"account-id": 10000001, | ||
"currency": "usdt", | ||
"record-id": 359044707902783800, | ||
"transact-amt": "-10.000000000000000000", | ||
"transact-type": "other-types", | ||
"avail-balance": "81.850043797676510303", | ||
"acct-balance": "97.010043797676510318", | ||
"transact-time": 1629882096557 | ||
}, | ||
{ | ||
"account-id": 10000001, | ||
"currency": "usdt", | ||
"record-id": 359044690723242100, | ||
"transact-amt": "-10.000000000000000000", | ||
"transact-type": "transfer", | ||
"avail-balance": "81.850043797676510303", | ||
"acct-balance": "87.010043797676510318", | ||
"transact-time": 1629882096569 | ||
} | ||
], | ||
"next-id": 47996522235 | ||
} |
33 changes: 33 additions & 0 deletions
33
HTX.Net.UnitTests/Endpoints/Spot/Account/GetAccountLedger.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,33 @@ | ||
GET | ||
/v2/account/ledger | ||
true | ||
{ | ||
"code": 200, | ||
"message": "success", | ||
"data": [ | ||
{ | ||
"accountId": 10000001, | ||
"currency": "usdt", | ||
"transactAmt": 10, | ||
"transactType": "transfer", | ||
"transferType": "margin-transfer-out", | ||
"transactId": 0, | ||
"transactTime": 1629882331066, | ||
"transferer": 28483123, | ||
"transferee": 13496526 | ||
}, | ||
{ | ||
"accountId": 10000001, | ||
"currency": "usdt", | ||
"transactAmt": -10, | ||
"transactType": "transfer", | ||
"transferType": "margin-transfer-in", | ||
"transactId": 0, | ||
"transactTime": 1629882096562, | ||
"transferer": 13496526, | ||
"transferee": 28483123 | ||
} | ||
], | ||
"nextId": 1624316679, | ||
"ok": true | ||
} |
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,26 @@ | ||
GET | ||
/v1/account/accounts | ||
true | ||
{ | ||
"status": "ok", | ||
"data": [ | ||
{ | ||
"id": 10000001, | ||
"type": "spot", | ||
"subtype": "", | ||
"state": "working" | ||
}, | ||
{ | ||
"id": 10000002, | ||
"type": "otc", | ||
"subtype": "", | ||
"state": "working" | ||
}, | ||
{ | ||
"id": 10000003, | ||
"type": "point", | ||
"subtype": "", | ||
"state": "working" | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
HTX.Net.UnitTests/Endpoints/Spot/Account/GetApiKeyInfo.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,30 @@ | ||
GET | ||
/v2/user/api-key | ||
true | ||
{ | ||
"code": 200, | ||
"message": "success", | ||
"data": [ | ||
{ | ||
"accessKey": "160bb889-b7XXXXbe-e0XXXXf5-ghxertfvbf", | ||
"status": "normal", | ||
"note": "host", | ||
"permission": "trade,readOnly", | ||
"ipAddresses": "192.168.0.1,192.168.1.1", | ||
"validDays": -1, | ||
"createTime": 1615192704000, | ||
"updateTime": 1623030338000 | ||
}, | ||
{ | ||
"accessKey": "5000d371-edXXXXf5tf-40XXXX8b-ab8e5", | ||
"status": "normal", | ||
"note": "host two", | ||
"permission": "readOnly,trade,withdraw", | ||
"ipAddresses": "", | ||
"validDays": 7, | ||
"createTime": 1623158078000, | ||
"updateTime": 1629875976000 | ||
} | ||
], | ||
"ok": true | ||
} |
11 changes: 11 additions & 0 deletions
11
HTX.Net.UnitTests/Endpoints/Spot/Account/GetAssetValuation.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 @@ | ||
GET | ||
/v2/account/asset-valuation | ||
true | ||
{ | ||
"code": 200, | ||
"data": { | ||
"balance": "34.75", | ||
"timestamp": 1594901254363 | ||
}, | ||
"ok": true | ||
} |
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,37 @@ | ||
GET | ||
/v1/account/accounts/1/balance | ||
true | ||
{ | ||
"status": "ok", | ||
"data": { | ||
"id": 1000001, | ||
"type": "spot", | ||
"state": "working", | ||
"list": [ | ||
{ | ||
"currency": "usdt", | ||
"type": "trade", | ||
"balance": "91.850043797676510303", | ||
"debt": "invalid", | ||
"available": "invalid", | ||
"seq-num": "477" | ||
}, | ||
{ | ||
"currency": "usdt", | ||
"type": "frozen", | ||
"balance": "5.160000000000000015", | ||
"debt": "invalid", | ||
"available": "invalid", | ||
"seq-num": "477" | ||
}, | ||
{ | ||
"currency": "poly", | ||
"type": "trade", | ||
"balance": "147.928994082840236", | ||
"debt": "invalid", | ||
"available": "invalid", | ||
"seq-num": "2" | ||
} | ||
] | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
HTX.Net.UnitTests/Endpoints/Spot/Account/GetDeductAssets.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,10 @@ | ||
GET | ||
/v1/account/overview/info | ||
true | ||
{ | ||
"code": 200, | ||
"data": { | ||
"currency": "HTX,TRX" | ||
}, | ||
"success": true | ||
} |
29 changes: 29 additions & 0 deletions
29
HTX.Net.UnitTests/Endpoints/Spot/Account/GetDepositAddresses.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/account/deposit/address | ||
true | ||
{ | ||
"code": 200, | ||
"data": [ | ||
{ | ||
"userId": 12345678, | ||
"currency": "btc", | ||
"address": "0xd476b0d77583fbda5180039f1f513b750cb4f527", | ||
"addressTag": "", | ||
"chain": "hbtc" | ||
}, | ||
{ | ||
"userId": 12345678, | ||
"currency": "btc", | ||
"address": "16egzDeZiVDJ4D44UbWKN6snLYFjS1aEmJ", | ||
"addressTag": "", | ||
"chain": "btc" | ||
}, | ||
{ | ||
"userId": 12345678, | ||
"currency": "btc", | ||
"address": "0xd476b0d77583fbda5180039f1f513b750cb4f527", | ||
"addressTag": "", | ||
"chain": "hrc20btc" | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
HTX.Net.UnitTests/Endpoints/Spot/Account/GetPlatformValuation.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/account/valuation | ||
true | ||
{ | ||
"code": 200, | ||
"data": { | ||
"updated": { | ||
"success": true, | ||
"time": 1629916724000 | ||
}, | ||
"todayProfitRate": "0.004638293764657609", | ||
"totalBalance": "0.06276321", | ||
"todayProfit": "0.00028977", | ||
"profitAccountBalanceList": [ | ||
{ | ||
"distributionType": "11", | ||
"balance": 0.05728808, | ||
"success": true, | ||
"accountBalance": "0.05728808" | ||
} | ||
] | ||
}, | ||
"success": true | ||
} |
19 changes: 19 additions & 0 deletions
19
HTX.Net.UnitTests/Endpoints/Spot/Account/GetPointBalance.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/point/account | ||
true | ||
{ | ||
"code": 200, | ||
"data": { | ||
"accountId": "14403739", | ||
"groupIds": [ | ||
{ | ||
"groupId": 26, | ||
"expiryDate": 1594396800000, | ||
"remainAmt": "0.3" | ||
} | ||
], | ||
"acctBalance": "0.30000000", | ||
"accountStatus": "working" | ||
}, | ||
"success": true | ||
} |
30 changes: 30 additions & 0 deletions
30
HTX.Net.UnitTests/Endpoints/Spot/Account/GetTradingFees.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,30 @@ | ||
GET | ||
/v2/reference/transact-fee-rate | ||
true | ||
{ | ||
"code": 200, | ||
"data": [ | ||
{ | ||
"symbol": "btcusdt", | ||
"actualMakerRate": "0.002", | ||
"actualTakerRate": "0.002", | ||
"takerFeeRate": "0.002", | ||
"makerFeeRate": "0.002" | ||
}, | ||
{ | ||
"symbol": "apnusdt", | ||
"actualMakerRate": "0.002", | ||
"actualTakerRate": "0.002", | ||
"takerFeeRate": "0.002", | ||
"makerFeeRate": "0.002" | ||
}, | ||
{ | ||
"symbol": "htusdt", | ||
"actualMakerRate": "0.002", | ||
"actualTakerRate": "0.002", | ||
"takerFeeRate": "0.002", | ||
"makerFeeRate": "0.002" | ||
} | ||
], | ||
"success": true | ||
} |
12 changes: 12 additions & 0 deletions
12
HTX.Net.UnitTests/Endpoints/Spot/Account/GetUserDeductionInfo.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,12 @@ | ||
GET | ||
/v1/account/switch/user/info | ||
true | ||
{ | ||
"code": 200, | ||
"data": { | ||
"pointSwitch": "1", | ||
"htxSwitch": "0", | ||
"currency": "HTX" | ||
}, | ||
"success": true | ||
} |
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,7 @@ | ||
GET | ||
/v2/user/uid | ||
true | ||
{ | ||
"code": 200, | ||
"data": 63628520 | ||
} |
40 changes: 40 additions & 0 deletions
40
HTX.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawDeposit.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,40 @@ | ||
GET | ||
/v1/query/deposit-withdraw | ||
true | ||
{ | ||
"status": "ok", | ||
"data": [ | ||
{ | ||
"id": 45182894, | ||
"type": "withdraw", | ||
"sub-type": "FAST", | ||
"currency": "usdt", | ||
"chain": "trc20usdt", | ||
"tx-hash": "", | ||
"amount": 400, | ||
"from-addr-tag": "", | ||
"address": "TRwkUYHWgUh23jbKpgTcYHgE9CcBzhGno9", | ||
"address-tag": "", | ||
"fee": 0, | ||
"state": "confirmed", | ||
"created-at": 1612261330443, | ||
"updated-at": 1612261389250 | ||
}, | ||
{ | ||
"id": 61003926, | ||
"type": "withdraw", | ||
"sub-type": "FAST", | ||
"currency": "usdt", | ||
"chain": "trc20usdt", | ||
"tx-hash": "", | ||
"amount": 2, | ||
"from-addr-tag": "", | ||
"address": "TYGvZSD1duPctGaMPSP12Fy8BrQMu2KCdp", | ||
"address-tag": "", | ||
"fee": 0, | ||
"state": "confirmed", | ||
"created-at": 1621416907639, | ||
"updated-at": 1621416907788 | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
HTX.Net.UnitTests/Endpoints/Spot/Account/GetWithdrawalAddresses.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,16 @@ | ||
GET | ||
/v2/account/withdraw/address | ||
true | ||
{ | ||
"code": 200, | ||
"data": [ | ||
{ | ||
"currency": "usdt", | ||
"chain": "hrc20usdt", | ||
"note": "tom", | ||
"addressTag": "", | ||
"address": "0x3b994f25c4c25e99d4d26364ffc014cce64600ca" | ||
} | ||
], | ||
"next-id": 30137790 | ||
} |
Oops, something went wrong.