GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ccxt/python/ccxt/hashkey.py at master · ccxt/ccxt Expand file tree/ Copy pathhashkey.pyMore file actions 4363 lines (4187 loc) · 200 KB / Copy pathhashkey.pyFile metadata and controls4363 lines (4187 loc) · 200 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 # -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.abstract.hashkey import ImplicitAPI import hashlib from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, CurrencyInterface, DepositAddress, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Status, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, FundingRateHistory, TransferEntry from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import AccountNotEnabled from ccxt.base.errors import AccountSuspended from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import BadSymbol from ccxt.base.errors import OperationRejected from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidAddress from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound from ccxt.base.errors import OrderImmediatelyFillable from ccxt.base.errors import OrderNotFillable from ccxt.base.errors import DuplicateOrderId from ccxt.base.errors import ContractUnavailable from ccxt.base.errors import NotSupported from ccxt.base.errors import OperationFailed from ccxt.base.errors import DDoSProtection from ccxt.base.errors import RateLimitExceeded from ccxt.base.errors import ExchangeNotAvailable from ccxt.base.errors import InvalidNonce from ccxt.base.errors import RequestTimeout from ccxt.base.decimal_to_precision import TICK_SIZE from ccxt.base.precise import Precise class hashkey(Exchange, ImplicitAPI): def describe(self) -> dict: return self.deep_extend(super(hashkey, self).describe(), { 'id': 'hashkey', 'name': 'HashKey Global', 'countries': ['BM'], # Bermuda 'rateLimit': 100, 'version': 'v1', 'certified': True, 'pro': True, 'has': { 'CORS': None, 'spot': True, 'margin': False, 'swap': True, 'future': False, 'option': False, 'addMargin': True, 'borrowCrossMargin': False, 'borrowIsolatedMargin': False, 'borrowMargin': False, 'cancelAllOrders': True, 'cancelAllOrdersAfter': False, 'cancelOrder': True, 'cancelOrders': True, 'cancelWithdraw': False, 'closeAllPositions': False, 'closePosition': False, 'createConvertTrade': False, 'createDepositAddress': False, 'createMarketBuyOrderWithCost': True, 'createMarketOrder': True, 'createMarketOrderWithCost': False, 'createMarketSellOrderWithCost': False, 'createOrder': True, 'createOrders': True, 'createOrderWithTakeProfitAndStopLoss': False, 'createReduceOnlyOrder': True, 'createStopLimitOrder': True, 'createStopLossOrder': False, 'createStopMarketOrder': True, 'createStopOrder': True, 'createTakeProfitOrder': False, 'createTrailingAmountOrder': False, 'createTrailingPercentOrder': False, 'createTriggerOrder': True, 'fetchAccounts': True, 'fetchAllGreeks': False, 'fetchBalance': True, 'fetchBorrowInterest': False, 'fetchBorrowRate': False, 'fetchBorrowRateHistories': False, 'fetchBorrowRateHistory': False, 'fetchBorrowRates': False, 'fetchBorrowRatesPerSymbol': False, 'fetchCanceledAndClosedOrders': True, 'fetchCanceledOrders': True, 'fetchClosedOrder': True, 'fetchClosedOrders': False, 'fetchConvertCurrencies': False, 'fetchConvertQuote': False, 'fetchConvertTrade': False, 'fetchConvertTradeHistory': False, 'fetchCrossBorrowRate': False, 'fetchCrossBorrowRates': False, 'fetchCurrencies': True, 'fetchDepositAddress': True, 'fetchDepositAddresses': False, 'fetchDepositAddressesByNetwork': False, 'fetchDeposits': True, 'fetchDepositsWithdrawals': False, 'fetchFundingHistory': False, 'fetchFundingInterval': False, 'fetchFundingIntervals': False, 'fetchFundingRate': True, 'fetchFundingRateHistory': True, 'fetchFundingRates': True, 'fetchGreeks': False, 'fetchIndexOHLCV': False, 'fetchIsolatedBorrowRate': False, 'fetchIsolatedBorrowRates': False, 'fetchIsolatedPositions': False, 'fetchLastPrices': True, 'fetchLedger': True, 'fetchLeverage': True, 'fetchLeverages': False, 'fetchLeverageTiers': True, 'fetchLiquidations': False, 'fetchLongShortRatio': False, 'fetchLongShortRatioHistory': False, 'fetchMarginAdjustmentHistory': False, 'fetchMarginMode': False, 'fetchMarginModes': False, 'fetchMarketLeverageTiers': 'emulated', 'fetchMarkets': True, 'fetchMarkOHLCV': False, 'fetchMarkPrice': False, 'fetchMarkPrices': False, 'fetchMyLiquidations': False, 'fetchMySettlementHistory': False, 'fetchMyTrades': True, 'fetchOHLCV': True, 'fetchOpenInterest': False, 'fetchOpenInterestHistory': False, 'fetchOpenInterests': False, 'fetchOpenOrder': False, 'fetchOpenOrders': True, 'fetchOption': False, 'fetchOptionChain': False, 'fetchOrder': True, 'fetchOrderBook': True, 'fetchOrders': False, 'fetchOrderTrades': False, 'fetchPosition': False, 'fetchPositionHistory': False, 'fetchPositionMode': False, 'fetchPositions': True, 'fetchPositionsForSymbol': True, 'fetchPositionsHistory': False, 'fetchPositionsRisk': False, 'fetchPremiumIndexOHLCV': False, 'fetchSettlementHistory': False, 'fetchStatus': True, 'fetchTicker': True, 'fetchTickers': True, 'fetchTime': True, 'fetchTrades': True, 'fetchTradingFee': True, # emulated for spot markets 'fetchTradingFees': True, # for spot markets only 'fetchTransactions': False, 'fetchTransfers': False, 'fetchUnderlyingAssets': False, 'fetchVolatilityHistory': False, 'fetchWithdrawals': True, 'reduceMargin': True, 'repayCrossMargin': False, 'repayIsolatedMargin': False, 'sandbox': False, 'setLeverage': True, 'setMargin': False, 'setMarginMode': True, 'setPositionMode': False, 'transfer': True, 'withdraw': True, }, 'timeframes': { '1m': '1m', '3m': '3m', '5m': '5m', '15m': '15m', '30m': '30m', '1h': '1h', '2h': '2h', '4h': '4h', '6h': '6h', '8h': '8h', '12h': '12h', '1d': '1d', '1w': '1w', '1M': '1M', }, 'urls': { 'logo': 'https://github.com/user-attachments/assets/3dd65db2-5da9-4ecc-93ac-6d420f36261c', 'api': { 'public': 'https://api-glb.hashkey.com', 'private': 'https://api-glb.hashkey.com', }, 'test': { 'public': 'https://api-glb.sim.hashkeydev.com', 'private': 'https://api-glb.sim.hashkeydev.com', }, 'www': 'https://global.hashkey.com/', 'doc': 'https://hashkeyglobal-apidoc.readme.io/', 'fees': 'https://support.global.hashkey.com/hc/en-us/articles/13199900083612-HashKey-Global-Fee-Structure', 'referral': 'https://global.hashkey.com/en-US/register/invite?invite_code=82FQUN', }, 'api': { 'public': { 'get': { 'api/v1/exchangeInfo': {'cost': 5}, 'quote/v1/depth': {'cost': 1}, 'quote/v1/trades': {'cost': 1}, 'quote/v1/klines': {'cost': 1}, 'quote/v1/ticker/24hr': {'cost': 1}, 'quote/v1/ticker/price': {'cost': 1}, 'quote/v1/ticker/bookTicker': {'cost': 1}, # not unified 'quote/v1/depth/merged': {'cost': 1}, 'quote/v1/markPrice': {'cost': 1}, 'quote/v1/index': {'cost': 1}, 'api/v1/futures/fundingRate': {'cost': 1}, 'api/v1/futures/historyFundingRate': {'cost': 1}, 'api/v1/ping': {'cost': 1}, 'api/v1/time': {'cost': 1}, }, }, 'private': { 'get': { 'api/v1/spot/order': {'cost': 1}, 'api/v1/spot/openOrders': {'cost': 1}, 'api/v1/spot/tradeOrders': {'cost': 5}, 'api/v1/futures/leverage': {'cost': 1}, 'api/v1/futures/order': {'cost': 1}, 'api/v1/futures/openOrders': {'cost': 1}, 'api/v1/futures/userTrades': {'cost': 1}, 'api/v1/futures/positions': {'cost': 1}, 'api/v1/futures/historyOrders': {'cost': 1}, 'api/v1/futures/balance': {'cost': 1}, 'api/v1/futures/liquidationAssignStatus': {'cost': 1}, 'api/v1/futures/riskLimit': {'cost': 1}, 'api/v1/futures/commissionRate': {'cost': 1}, 'api/v1/futures/getBestOrder': {'cost': 1}, 'api/v1/coinInfo': {'cost': 1}, 'api/v1/account/vipInfo': {'cost': 1}, 'api/v1/account': {'cost': 1}, 'api/v1/account/trades': {'cost': 5}, 'api/v1/account/type': {'cost': 5}, 'api/v1/account/chainType': {'cost': 1}, 'api/v1/account/checkApiKey': {'cost': 1}, 'api/v1/account/balanceFlow': {'cost': 5}, 'api/v1/spot/subAccount/openOrders': {'cost': 1}, 'api/v1/spot/subAccount/tradeOrders': {'cost': 1}, 'api/v1/subAccount/trades': {'cost': 1}, 'api/v1/futures/subAccount/openOrders': {'cost': 1}, 'api/v1/futures/subAccount/historyOrders': {'cost': 1}, 'api/v1/futures/subAccount/userTrades': {'cost': 1}, 'api/v1/account/deposit/address': {'cost': 1}, 'api/v1/account/depositOrders': {'cost': 1}, 'api/v1/account/withdrawOrders': {'cost': 1}, 'api/v1/affiliate/inviteeInfo': {'cost': 1}, }, 'post': { 'api/v1/userDataStream': {'cost': 1}, 'api/v1/spot/orderTest': {'cost': 1}, 'api/v1/spot/order': {'cost': 1}, 'api/v1.1/spot/order': {'cost': 1}, 'api/v1/spot/batchOrders': {'cost': 5}, 'api/v1/futures/leverage': {'cost': 1}, 'api/v1/futures/order': {'cost': 1}, 'api/v1/futures/marginType': {'cost': 1}, 'api/v1/futures/positionMargin': {'cost': 1}, 'api/v1/futures/position/trading-stop': {'cost': 3}, 'api/v1/futures/batchOrders': {'cost': 5}, 'api/v1/account/assetTransfer': {'cost': 1}, 'api/v1/account/authAddress': {'cost': 1}, 'api/v1/account/withdraw': {'cost': 1}, }, 'put': { 'api/v1/userDataStream': {'cost': 1}, }, 'delete': { 'api/v1/spot/order': {'cost': 1}, 'api/v1/spot/openOrders': {'cost': 5}, 'api/v1/spot/cancelOrderByIds': {'cost': 5}, 'api/v1/spot/cancelAllOpenOrders': {'cost': 5}, 'api/v1/futures/order': {'cost': 1}, 'api/v1/futures/batchOrders': {'cost': 1}, 'api/v1/futures/cancelOrderByIds': {'cost': 1}, 'api/v1/futures/cancelAllOpenOrders': {'cost': 1}, 'api/v1/userDataStream': {'cost': 1}, }, }, }, 'fees': { 'trading': { 'spot': { 'tierBased': True, 'percentage': True, 'feeSide': 'get', 'maker': self.parse_number('0.0012'), 'taker': self.parse_number('0.0012'), 'tiers': { 'maker': [ [self.parse_number('0'), self.parse_number('0.0012')], [self.parse_number('1000000'), self.parse_number('0.00080')], [self.parse_number('5000000'), self.parse_number('0.00070')], [self.parse_number('10000000'), self.parse_number('0.00060')], [self.parse_number('50000000'), self.parse_number('0.00040')], [self.parse_number('200000000'), self.parse_number('0.00030')], [self.parse_number('400000000'), self.parse_number('0.00010')], [self.parse_number('800000000'), self.parse_number('0.00')], ], 'taker': [ [self.parse_number('0'), self.parse_number('0.0012')], [self.parse_number('1000000'), self.parse_number('0.00090')], [self.parse_number('5000000'), self.parse_number('0.00085')], [self.parse_number('10000000'), self.parse_number('0.00075')], [self.parse_number('50000000'), self.parse_number('0.00065')], [self.parse_number('200000000'), self.parse_number('0.00045')], [self.parse_number('400000000'), self.parse_number('0.00040')], [self.parse_number('800000000'), self.parse_number('0.00035')], ], }, }, 'swap': { 'tierBased': True, 'percentage': True, 'feeSide': 'get', 'maker': self.parse_number('0.00025'), 'taker': self.parse_number('0.00060'), 'tiers': { 'maker': [ [self.parse_number('0'), self.parse_number('0.00025')], [self.parse_number('1000000'), self.parse_number('0.00016')], [self.parse_number('5000000'), self.parse_number('0.00014')], [self.parse_number('10000000'), self.parse_number('0.00012')], [self.parse_number('50000000'), self.parse_number('0.000080')], [self.parse_number('200000000'), self.parse_number('0.000060')], [self.parse_number('400000000'), self.parse_number('0.000020')], [self.parse_number('800000000'), self.parse_number('0.00')], ], 'taker': [ [self.parse_number('0'), self.parse_number('0.00060')], [self.parse_number('1000000'), self.parse_number('0.00050')], [self.parse_number('5000000'), self.parse_number('0.00045')], [self.parse_number('10000000'), self.parse_number('0.00040')], [self.parse_number('50000000'), self.parse_number('0.00035')], [self.parse_number('200000000'), self.parse_number('0.00030')], [self.parse_number('400000000'), self.parse_number('0.00025')], [self.parse_number('800000000'), self.parse_number('0.00020')], ], }, }, }, }, 'options': { 'broker': '10000700011', 'recvWindow': None, 'sandboxMode': False, 'networks': { 'BTC': 'BTC', 'ERC20': 'ETH', 'AVAX': 'AvalancheC', 'SOL': 'Solana', 'MATIC': 'Polygon', 'ATOM': 'Cosmos', 'DOT': 'Polkadot', 'LTC': 'LTC', 'OPTIMISM': 'Optimism', 'ARBITRUM': 'Arbitrum', 'DOGE': 'Dogecoin', 'TRC20': 'Tron', 'ZKSYNC': 'zkSync', 'TON': 'TON', 'KLAYTN': 'Klaytn', 'MERLINCHAIN': 'Merlin Chain', }, 'networksById': { 'BTC': 'BTC', 'Bitcoin': 'BTC', 'ETH': 'ERC20', 'ERC20': 'ERC20', 'AvalancheC': 'AVAX', 'AVAX C-Chain': 'AVAX', 'Solana': 'SOL', 'Cosmos': 'ATOM', 'Arbitrum': 'ARBITRUM', 'Polygon': 'MATIC', 'Optimism': 'OPTIMISM', 'Polkadot': 'DOT', 'LTC': 'LTC', 'Litecoin': 'LTC', 'Dogecoin': 'DOGE', 'Merlin Chain': 'MERLINCHAIN', 'zkSync': 'ZKSYNC', 'TRC20': 'TRC20', 'Tron': 'TRC20', 'TON': 'TON', 'BSC(BEP20)': 'BEP20', 'Klaytn': 'KLAYTN', }, 'defaultNetwork': 'ERC20', }, 'features': { 'default': { 'sandbox': True, 'createOrder': { 'marginMode': False, 'triggerPrice': False, 'triggerPriceType': None, 'triggerDirection': False, 'stopLossPrice': False, 'takeProfitPrice': False, 'attachedStopLossTakeProfit': None, 'timeInForce': { 'IOC': True, 'FOK': True, 'PO': True, 'GTD': False, }, 'hedged': False, 'trailing': False, 'leverage': False, 'marketBuyByCost': True, 'marketBuyRequiresPrice': True, # todo fix 'selfTradePrevention': True, # todo implement 'iceberg': False, }, 'createOrders': { 'max': 20, }, 'fetchMyTrades': { 'marginMode': False, 'limit': 1000, 'daysBack': 30, 'untilDays': 30, 'symbolRequired': False, }, 'fetchOrder': { 'marginMode': False, 'trigger': False, 'trailing': False, 'symbolRequired': False, }, 'fetchOpenOrders': { 'marginMode': False, 'limit': 1000, 'trigger': False, 'trailing': False, 'symbolRequired': False, }, 'fetchOrders': None, 'fetchClosedOrders': None, # todo 'fetchOHLCV': { 'limit': 1000, }, }, 'spot': { 'extends': 'default', }, 'forDerivatives': { 'extends': 'default', 'createOrder': { 'triggerPrice': True, 'selfTradePrevention': True, }, 'fetchOpenOrders': { 'trigger': True, 'limit': 500, }, }, 'swap': { 'linear': { 'extends': 'forDerivatives', }, 'inverse': None, }, 'future': { 'linear': None, 'inverse': None, }, }, 'commonCurrencies': {}, 'exceptions': { 'exact': { '0001': BadRequest, # Required field '%s' missing or invalid. '0002': AuthenticationError, # Incorrect signature '0003': RateLimitExceeded, # Rate limit exceeded '0102': AuthenticationError, # Invalid APIKey '0103': AuthenticationError, # APIKey expired '0104': PermissionDenied, # The accountId defined is not permissible '0201': ExchangeError, # Instrument not found '0202': PermissionDenied, # Invalid IP '0206': BadRequest, # Unsupported order type '0207': BadRequest, # Invalid price '0209': BadRequest, # Invalid price precision '0210': BadRequest, # Price outside of allowed range '0211': OrderNotFound, # Order not found '0401': InsufficientFunds, # Insufficient asset '0402': BadRequest, # Invalid asset '-1000': ExchangeError, # An unknown error occurred while processing the request '-1001': ExchangeError, # Internal error '-100010': BadSymbol, # Invalid Symbols! '-100012': BadSymbol, # Parameter symbol [String] missing! '-1002': AuthenticationError, # Unauthorized operation '-1004': BadRequest, # Bad request '-1005': PermissionDenied, # No permission '-1006': ExchangeError, # Execution status unknown '-1007': RequestTimeout, # Timeout waiting for response from server '-1014': InvalidOrder, # Unsupported order combination '-1015': InvalidOrder, # Too many new orders '-1020': OperationRejected, # Unsupported operation '-1021': InvalidNonce, # Timestamp for this request is outside of the recvWindow '-1024': BadRequest, # Duplicate request '-1101': ExchangeNotAvailable, # Feature has been offline '-1115': InvalidOrder, # Invalid timeInForce '-1117': InvalidOrder, # Invalid order side '-1123': InvalidOrder, # Invalid client order id '-1124': InvalidOrder, # Invalid price '-1126': InvalidOrder, # Invalid quantity '-1129': BadRequest, # Invalid parameters, quantity and amount are not allowed to be sent at the same time. '-1130': BadRequest, # Illegal parameter '%s' '-1132': BadRequest, # Order price greater than the maximum '-1133': BadRequest, # Order price lower than the minimum '-1135': BadRequest, # Order quantity greater than the maximum '-1136': BadRequest, # Order quantity lower than the minimum '-1138': InvalidOrder, # Order has been partially cancelled '-1137': InvalidOrder, # Order quantity precision too large '-1139': OrderImmediatelyFillable, # Order has been filled '-1140': InvalidOrder, # Order amount lower than the minimum '-1141': DuplicateOrderId, # Duplicate order '-1142': OrderNotFillable, # Order has been cancelled '-1143': OrderNotFound, # Order not found on order book '-1144': OperationRejected, # Order has been locked '-1145': NotSupported, # Cancellation on this order type not supported '-1146': RequestTimeout, # Order creation timeout '-1147': RequestTimeout, # Order cancellation timeout '-1148': InvalidOrder, # Order amount precision too large '-1149': OperationRejected, # Order creation failed '-1150': OperationFailed, # Order cancellation failed '-1151': OperationRejected, # The trading pair is not open yet '-1152': AccountNotEnabled, # User does not exist '-1153': InvalidOrder, # Invalid price type '-1154': InvalidOrder, # Invalid position side '-1155': OperationRejected, # The trading pair is not available for api trading '-1156': OperationFailed, # Limit maker order creation failed '-1157': OperationFailed, # Modify futures margin failed '-1158': OperationFailed, # Reduce margin is forbidden '-1159': AccountNotEnabled, # Finance account already exists '-1160': AccountNotEnabled, # Account does not exist '-1161': OperationFailed, # Balance transfer failed '-1162': ContractUnavailable, # Unsupport contract address '-1163': InvalidAddress, # Illegal withdrawal address '-1164': OperationFailed, # Withdraw failed '-1165': ArgumentsRequired, # Withdrawal amount cannot be null '-1166': OperationRejected, # Withdrawal amount exceeds the daily limit '-1167': BadRequest, # Withdrawal amount less than the minimum '-1168': BadRequest, # Illegal withdrawal amount '-1169': PermissionDenied, # Withdraw not allowed '-1170': PermissionDenied, # Deposit not allowed '-1171': PermissionDenied, # Withdrawal address not in whitelist '-1172': BadRequest, # Invalid from account id '-1173': BadRequest, # Invalid to account i '-1174': PermissionDenied, # Transfer not allowed between the same account '-1175': BadRequest, # Invalid fiat deposit status '-1176': BadRequest, # Invalid fiat withdrawal status '-1177': InvalidOrder, # Invalid fiat order type '-1178': AccountNotEnabled, # Brokerage account does not exist '-1179': AccountSuspended, # Address owner is not true '-1181': ExchangeError, # System error '-1193': OperationRejected, # Order creation count exceeds the limit '-1194': OperationRejected, # Market order creation forbidden '-1195': BadRequest, # Market order long position cannot exceed %s above the market price '-1196': BadRequest, # Market order short position cannot be below %s of the market price '-1200': BadRequest, # Order buy quantity too small '-1201': BadRequest, # Order buy quantity too large '-1202': BadRequest, # Order sell quantity too small '-1203': BadRequest, # Order sell quantity too large '-1204': BadRequest, # From account must be a main account '-1205': AccountNotEnabled, # Account not authorized '-1206': BadRequest, # Order amount greater than the maximum '-1207': BadRequest, # The status of deposit is invalid '-1208': BadRequest, # The orderType of fiat is invalid '-1209': BadRequest, # The status of withdraw is invalid '-2001': ExchangeNotAvailable, # Platform is yet to open trading '-2002': OperationFailed, # The number of open orders exceeds the limit 300 '-2003': OperationFailed, # Position size cannot meet target leverage '-2004': OperationFailed, # Adjust leverage fail '-2005': RequestTimeout, # Adjust leverage timeout '-2010': OperationRejected, # New order rejected '-2011': OperationRejected, # Order cancellation rejected '-2016': OperationRejected, # API key creation exceeds the limit '-2017': OperationRejected, # Open orders exceeds the limit of the trading pair '-2018': OperationRejected, # Trade user creation exceeds the limit '-2019': PermissionDenied, # Trader and omnibus user not allowed to login app '-2020': PermissionDenied, # Not allowed to trade this trading pair '-2021': PermissionDenied, # Not allowed to trade this trading pair '-2022': OperationRejected, # Order batch size exceeds the limit '-2023': AuthenticationError, # Need to pass KYC verification '-2024': AccountNotEnabled, # Fiat account does not exist '-2025': AccountNotEnabled, # Custody account not exist '-2026': BadRequest, # Invalid type '-2027': OperationRejected, # Exceed maximum time range of 30 days '-2028': OperationRejected, # The search is limited to data within the last one month '-2029': OperationRejected, # The search is limited to data within the last three months '-2030': InsufficientFunds, # Insufficient margin '-2031': NotSupported, # Leverage reduction is not supported in Isolated Margin Mode with open positions '-2032': OperationRejected, # After the transaction, your %s position will account for %s of the total position, which poses concentration risk. Do you want to continue with the transaction? '-2033': OperationFailed, # Order creation failed. Please verify if the order parameters comply with the trading rules '-2034': InsufficientFunds, # Trade account holding limit is zero '-2035': OperationRejected, # The sub account has been frozen and cannot transfer '-2036': NotSupported, # We do not support queries for records exceeding 30 days '-2037': ExchangeError, # Position and order data error '-2038': InsufficientFunds, # Insufficient margin '-2039': NotSupported, # Leverage reduction is not supported in Isolated Margin Mode with open positions '-2040': ExchangeNotAvailable, # There is a request being processed. Please try again later '-2041': BadRequest, # Token does not exist '-2042': OperationRejected, # You have passed the trade limit, please pay attention to the risks '-2043': OperationRejected, # Maximum allowed leverage reached, please lower your leverage '-2044': BadRequest, # This order price is unreasonable to exceed (or be lower than) the liquidation price '-2045': BadRequest, # Price too low, please order again! '-2046': BadRequest, # Price too high, please order again! '-2048': BadRequest, # Exceed the maximum number of conditional orders of %s '-2049': BadRequest, # Create stop order buy price too big '-2050': BadRequest, # Create stop order sell price too small '-2051': OperationRejected, # Create order rejected '-2052': OperationRejected, # Create stop profit-loss plan order reject '-2053': OperationRejected, # Position not enough '-2054': BadRequest, # Invalid long stop profit price '-2055': BadRequest, # Invalid long stop loss price '-2056': BadRequest, # Invalid short stop profit price '-2057': BadRequest, # Invalid short stop loss price '-3117': PermissionDenied, # Invalid permission '-3143': PermissionDenied, # According to KYC and risk assessment, your trading account has exceeded the limit. '-3144': PermissionDenied, # Currently, your trading account has exceeded its limit and is temporarily unable to perform transfers '-3145': DDoSProtection, # Please DO NOT submit request too frequently '-4001': BadRequest, # Invalid asset '-4002': BadRequest, # Withdrawal amount less than Minimum Withdrawal Amount '-4003': InsufficientFunds, # Insufficient Balance '-4004': BadRequest, # Invalid bank account number '-4005': BadRequest, # Assets are not listed '-4006': AccountNotEnabled, # KYC is not certified '-4007': NotSupported, # Withdrawal channels are not supported '-4008': AccountNotEnabled, # This currency does not support this customer type '-4009': PermissionDenied, # No withdrawal permission '-4010': PermissionDenied, # Withdrawals on the same day exceed the maximum limit for a single day '-4011': ExchangeError, # System error '-4012': ExchangeError, # Parameter error '-4013': OperationFailed, # Withdraw repeatly }, 'broad': {}, }, 'precisionMode': TICK_SIZE, }) def fetch_time(self, params: dict = {}) -> Int: """ fetches the current integer timestamp in milliseconds from the exchange server https://hashkeyglobal-apidoc.readme.io/reference/check-server-time :param dict [params]: extra parameters specific to the exchange API endpoint :returns int: the current integer timestamp in milliseconds from the exchange server """ response = self.publicGetApiV1Time(params) # # { # "serverTime": 1721661553214 # } # return self.safe_integer(response, 'serverTime') def fetch_status(self, params: dict = {}) -> Status: """ the latest known information on the availability of the exchange API https://hashkeyglobal-apidoc.readme.io/reference/test-connectivity :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: a `status structure <https://docs.ccxt.com/?id=exchange-status-structure>` """ response = self.publicGetApiV1Ping(params) # # {} # return { 'status': 'ok', 'updated': None, 'eta': None, 'url': None, 'info': response, } def fetch_markets(self, params: dict = {}) -> list[Market]: """ retrieves data on all markets for the exchange https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo :param dict [params]: extra parameters specific to the exchange API endpoint :param str [params.symbol]: the id of the market to fetch :returns dict[]: an array of objects representing market data """ request = {} response = self.publicGetApiV1ExchangeInfo(self.extend(request, params)) # # { # "timezone": "UTC", # "serverTime": "1721661653952", # "brokerFilters": [], # "symbols": [ # { # "symbol": "BTCUSDT", # "symbolName": "BTCUSDT", # "status": "TRADING", # "baseAsset": "BTC", # "baseAssetName": "BTC", # "baseAssetPrecision": "0.00001", # "quoteAsset": "USDT", # "quoteAssetName": "USDT", # "quotePrecision": "0.0000001", # "retailAllowed": true, # "piAllowed": true, # "corporateAllowed": true, # "omnibusAllowed": true, # "icebergAllowed": false, # "isAggregate": false, # "allowMargin": false, # "filters": [ # { # "minPrice": "0.01", # "maxPrice": "100000.00000000", # "tickSize": "0.01", # "filterType": "PRICE_FILTER" # }, # { # "minQty": "0.00001", # "maxQty": "8", # "stepSize": "0.00001", # "marketOrderMinQty": "0.00001", # "marketOrderMaxQty": "4", # "filterType": "LOT_SIZE" # }, # { # "minNotional": "1", # "filterType": "MIN_NOTIONAL" # }, # { # "minAmount": "1", # "maxAmount": "400000", # "minBuyPrice": "0", # "marketOrderMinAmount": "1", # "marketOrderMaxAmount": "200000", # "filterType": "TRADE_AMOUNT" # }, # { # "maxSellPrice": "0", # "buyPriceUpRate": "0.1", # "sellPriceDownRate": "0.1", # "filterType": "LIMIT_TRADING" # }, # { # "buyPriceUpRate": "0.1", # "sellPriceDownRate": "0.1", # "filterType": "MARKET_TRADING" # }, # { # "noAllowMarketStartTime": "1710485700000", # "noAllowMarketEndTime": "1710486000000", # "limitOrderStartTime": "0", # "limitOrderEndTime": "0", # "limitMinPrice": "0", # "limitMaxPrice": "0", # "filterType": "OPEN_QUOTE" # } # ] # } # ], # "options": [ ], # "contracts": [ # { # "filters": [ # { # "minPrice": "0.1", # "maxPrice": "100000.00000000", # "tickSize": "0.1", # "filterType": "PRICE_FILTER" # }, # { # "minQty": "0.001", # "maxQty": "10", # "stepSize": "0.001", # "marketOrderMinQty": "0", # "marketOrderMaxQty": "0", # "filterType": "LOT_SIZE" # }, # { # "minNotional": "0", # "filterType": "MIN_NOTIONAL" # }, # { # "maxSellPrice": "999999", # "buyPriceUpRate": "0.05", # "sellPriceDownRate": "0.05", # "maxEntrustNum": 200, # "maxConditionNum": 200, # "filterType": "LIMIT_TRADING" # }, # { # "buyPriceUpRate": "0.05", # "sellPriceDownRate": "0.05", # "filterType": "MARKET_TRADING" # }, # { # "noAllowMarketStartTime": "0", # "noAllowMarketEndTime": "0", # "limitOrderStartTime": "0", # "limitOrderEndTime": "0", # "limitMinPrice": "0", # "limitMaxPrice": "0", # "filterType": "OPEN_QUOTE" # } # ], # "exchangeId": "301", # "symbol": "BTCUSDT-PERPETUAL", # "symbolName": "BTCUSDT-PERPETUAL", # "status": "TRADING", # "baseAsset": "BTCUSDT-PERPETUAL", # "baseAssetPrecision": "0.001", # "quoteAsset": "USDT", # "quoteAssetPrecision": "0.1", # "icebergAllowed": false, # "inverse": false, # "index": "USDT", # "marginToken": "USDT", # "marginPrecision": "0.0001", # "contractMultiplier": "0.001", # "underlying": "BTC", # "riskLimits": [ # { # "riskLimitId": "200000722", # "quantity": "1000.00", # "initialMargin": "0.10", # "maintMargin": "0.005", # "isWhite": false # }, # { # "riskLimitId": "200000723", # "quantity": "2000.00", # "initialMargin": "0.10", # "maintMargin": "0.01", # "isWhite": false # } # ] # } # ], # "coins": [ # { # "orgId": "9001", # "coinId": "BTC", # "coinName": "BTC", # "coinFullName": "Bitcoin", # "allowWithdraw": true, # "allowDeposit": true, # "tokenType": "CHAIN_TOKEN", # "chainTypes": [ # { # "chainType": "Bitcoin", # "withdrawFee": "0", # "minWithdrawQuantity": "0.002", # "maxWithdrawQuantity": "0", # "minDepositQuantity": "0.0005", # "allowDeposit": true, # "allowWithdraw": true # } # ] # } # ] # } # spotMarkets = self.safe_list(response, 'symbols', []) swapMarkets = self.safe_list(response, 'contracts', []) markets = self.array_concat(spotMarkets, swapMarkets) if self.is_empty(markets): markets = [response] # if user provides params.symbol the exchange returns a single object instead of list of objects return self.parse_markets(markets) def parse_market(self, market: dict) -> Market: # spot # { # "symbol": "BTCUSDT", # "symbolName": "BTCUSDT", # "status": "TRADING", # "baseAsset": "BTC", # "baseAssetName": "BTC", # "baseAssetPrecision": "0.00001", # "quoteAsset": "USDT", # "quoteAssetName": "USDT", # "quotePrecision": "0.0000001", # "retailAllowed": true, # "piAllowed": true, # "corporateAllowed": true, # "omnibusAllowed": true, # "icebergAllowed": false, # "isAggregate": false, # "allowMargin": false, # "filters": [ # { # "minPrice": "0.01", # "maxPrice": "100000.00000000", # "tickSize": "0.01", # "filterType": "PRICE_FILTER" # }, # { # "minQty": "0.00001", # "maxQty": "8", # "stepSize": "0.00001", # "marketOrderMinQty": "0.00001", # "marketOrderMaxQty": "4", # "filterType": "LOT_SIZE" # }, # { # "minNotional": "1", # "filterType": "MIN_NOTIONAL" # }, # { # "minAmount": "1", # "maxAmount": "400000", # "minBuyPrice": "0", # "marketOrderMinAmount": "1", # "marketOrderMaxAmount": "200000", # "filterType": "TRADE_AMOUNT" # }, # { # "maxSellPrice": "0", # "buyPriceUpRate": "0.1", # "sellPriceDownRate": "0.1", # "filterType": "LIMIT_TRADING" # }, # { # "buyPriceUpRate": "0.1", # "sellPriceDownRate": "0.1", # "filterType": "MARKET_TRADING" # }, # { # "noAllowMarketStartTime": "1710485700000", # "noAllowMarketEndTime": "1710486000000", # "limitOrderStartTime": "0", # "limitOrderEndTime": "0", # "limitMinPrice": "0", # "limitMaxPrice": "0", # "filterType": "OPEN_QUOTE" # } # ] # } # # swap # { # "filters": [ # { # "minPrice": "0.1", # "maxPrice": "100000.00000000", # "tickSize": "0.1", # "filterType": "PRICE_FILTER" # }, # { # "minQty": "0.001", # "maxQty": "10", # "stepSize": "0.001", # "marketOrderMinQty": "0", # "marketOrderMaxQty": "0", # "filterType": "LOT_SIZE" # }, # { # "minNotional": "0", # "filterType": "MIN_NOTIONAL" # }, # { # "maxSellPrice": "999999", # "buyPriceUpRate": "0.05", # "sellPriceDownRate": "0.05", # "maxEntrustNum": 200, # "maxConditionNum": 200, # "filterType": "LIMIT_TRADING" # }, # { # "buyPriceUpRate": "0.05", # "sellPriceDownRate": "0.05", # "filterType": "MARKET_TRADING" # }, # { # "noAllowMarketStartTime": "0", # "noAllowMarketEndTime": "0", |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |