@upbit-official/upbit-sdk 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +390 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +261 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +261 -0
- package/client.d.ts.map +1 -0
- package/client.js +557 -0
- package/client.js.map +1 -0
- package/client.mjs +553 -0
- package/client.mjs.map +1 -0
- package/core/EventEmitter.d.mts +56 -0
- package/core/EventEmitter.d.mts.map +1 -0
- package/core/EventEmitter.d.ts +56 -0
- package/core/EventEmitter.d.ts.map +1 -0
- package/core/EventEmitter.js +93 -0
- package/core/EventEmitter.js.map +1 -0
- package/core/EventEmitter.mjs +88 -0
- package/core/EventEmitter.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +73 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +69 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +51 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +51 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +150 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +133 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +63 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +63 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +125 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +118 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +10 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +6 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +8 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -0
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +3 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +2 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +40 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +35 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +78 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +73 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +78 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +78 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +13 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +9 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +9 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +8 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +97 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +90 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +3 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +2 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +37 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +32 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +21 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +17 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +84 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +78 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +9 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +5 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +6 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +2 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +21 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +17 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +111 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +93 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/internal/ws.d.mts +31 -0
- package/internal/ws.d.mts.map +1 -0
- package/internal/ws.d.ts +31 -0
- package/internal/ws.d.ts.map +1 -0
- package/internal/ws.js +39 -0
- package/internal/ws.js.map +1 -0
- package/internal/ws.mjs +36 -0
- package/internal/ws.mjs.map +1 -0
- package/lib/index.d.mts +5 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +4 -0
- package/lib/index.mjs.map +1 -0
- package/lib/jsonParseFloat.d.mts +16 -0
- package/lib/jsonParseFloat.d.mts.map +1 -0
- package/lib/jsonParseFloat.d.ts +16 -0
- package/lib/jsonParseFloat.d.ts.map +1 -0
- package/lib/jsonParseFloat.js +77 -0
- package/lib/jsonParseFloat.js.map +1 -0
- package/lib/jsonParseFloat.mjs +74 -0
- package/lib/jsonParseFloat.mjs.map +1 -0
- package/lib/jwtAuth.d.mts +7 -0
- package/lib/jwtAuth.d.mts.map +1 -0
- package/lib/jwtAuth.d.ts +7 -0
- package/lib/jwtAuth.d.ts.map +1 -0
- package/lib/jwtAuth.js +33 -0
- package/lib/jwtAuth.js.map +1 -0
- package/lib/jwtAuth.mjs +30 -0
- package/lib/jwtAuth.mjs.map +1 -0
- package/lib/ws.d.mts +95 -0
- package/lib/ws.d.mts.map +1 -0
- package/lib/ws.d.ts +95 -0
- package/lib/ws.d.ts.map +1 -0
- package/lib/ws.js +229 -0
- package/lib/ws.js.map +1 -0
- package/lib/ws.mjs +223 -0
- package/lib/ws.mjs.map +1 -0
- package/package.json +169 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/accounts.d.mts +48 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +48 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +19 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +15 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/api-keys.d.mts +33 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +33 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +19 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +15 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/candles.d.mts +310 -0
- package/resources/candles.d.mts.map +1 -0
- package/resources/candles.d.ts +310 -0
- package/resources/candles.d.ts.map +1 -0
- package/resources/candles.js +117 -0
- package/resources/candles.js.map +1 -0
- package/resources/candles.mjs +113 -0
- package/resources/candles.mjs.map +1 -0
- package/resources/deposits.d.mts +373 -0
- package/resources/deposits.d.mts.map +1 -0
- package/resources/deposits.d.ts +373 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +139 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +135 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/index.d.mts +15 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +15 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +32 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +15 -0
- package/resources/index.mjs.map +1 -0
- package/resources/orderbooks.d.mts +134 -0
- package/resources/orderbooks.d.mts.map +1 -0
- package/resources/orderbooks.d.ts +134 -0
- package/resources/orderbooks.d.ts.map +1 -0
- package/resources/orderbooks.js +31 -0
- package/resources/orderbooks.js.map +1 -0
- package/resources/orderbooks.mjs +27 -0
- package/resources/orderbooks.mjs.map +1 -0
- package/resources/orders.d.mts +886 -0
- package/resources/orders.d.mts.map +1 -0
- package/resources/orders.d.ts +886 -0
- package/resources/orders.d.ts.map +1 -0
- package/resources/orders.js +250 -0
- package/resources/orders.js.map +1 -0
- package/resources/orders.mjs +246 -0
- package/resources/orders.mjs.map +1 -0
- package/resources/tickers.d.mts +184 -0
- package/resources/tickers.d.mts.map +1 -0
- package/resources/tickers.d.ts +184 -0
- package/resources/tickers.d.ts.map +1 -0
- package/resources/tickers.js +30 -0
- package/resources/tickers.js.map +1 -0
- package/resources/tickers.mjs +26 -0
- package/resources/tickers.mjs.map +1 -0
- package/resources/trades.d.mts +107 -0
- package/resources/trades.d.mts.map +1 -0
- package/resources/trades.d.ts +107 -0
- package/resources/trades.d.ts.map +1 -0
- package/resources/trades.js +19 -0
- package/resources/trades.js.map +1 -0
- package/resources/trades.mjs +15 -0
- package/resources/trades.mjs.map +1 -0
- package/resources/trading-pairs.d.mts +96 -0
- package/resources/trading-pairs.d.mts.map +1 -0
- package/resources/trading-pairs.d.ts +96 -0
- package/resources/trading-pairs.d.ts.map +1 -0
- package/resources/trading-pairs.js +19 -0
- package/resources/trading-pairs.js.map +1 -0
- package/resources/trading-pairs.mjs +15 -0
- package/resources/trading-pairs.mjs.map +1 -0
- package/resources/travel-rule.d.mts +139 -0
- package/resources/travel-rule.d.mts.map +1 -0
- package/resources/travel-rule.d.ts +139 -0
- package/resources/travel-rule.d.ts.map +1 -0
- package/resources/travel-rule.js +68 -0
- package/resources/travel-rule.js.map +1 -0
- package/resources/travel-rule.mjs +64 -0
- package/resources/travel-rule.mjs.map +1 -0
- package/resources/wallet-status.d.mts +74 -0
- package/resources/wallet-status.d.mts.map +1 -0
- package/resources/wallet-status.d.ts +74 -0
- package/resources/wallet-status.d.ts.map +1 -0
- package/resources/wallet-status.js +19 -0
- package/resources/wallet-status.js.map +1 -0
- package/resources/wallet-status.mjs +15 -0
- package/resources/wallet-status.mjs.map +1 -0
- package/resources/withdraws.d.mts +599 -0
- package/resources/withdraws.d.mts.map +1 -0
- package/resources/withdraws.d.ts +599 -0
- package/resources/withdraws.d.ts.map +1 -0
- package/resources/withdraws.js +139 -0
- package/resources/withdraws.js.map +1 -0
- package/resources/withdraws.mjs +135 -0
- package/resources/withdraws.mjs.map +1 -0
- package/resources/ws-private/index.d.mts +3 -0
- package/resources/ws-private/index.d.mts.map +1 -0
- package/resources/ws-private/index.d.ts +3 -0
- package/resources/ws-private/index.d.ts.map +1 -0
- package/resources/ws-private/index.js +6 -0
- package/resources/ws-private/index.js.map +1 -0
- package/resources/ws-private/index.mjs +2 -0
- package/resources/ws-private/index.mjs.map +1 -0
- package/resources/ws-private/internal-base.d.mts +58 -0
- package/resources/ws-private/internal-base.d.mts.map +1 -0
- package/resources/ws-private/internal-base.d.ts +58 -0
- package/resources/ws-private/internal-base.d.ts.map +1 -0
- package/resources/ws-private/internal-base.js +51 -0
- package/resources/ws-private/internal-base.js.map +1 -0
- package/resources/ws-private/internal-base.mjs +45 -0
- package/resources/ws-private/internal-base.mjs.map +1 -0
- package/resources/ws-private/ws-private.d.mts +224 -0
- package/resources/ws-private/ws-private.d.mts.map +1 -0
- package/resources/ws-private/ws-private.d.ts +224 -0
- package/resources/ws-private/ws-private.d.ts.map +1 -0
- package/resources/ws-private/ws-private.js +8 -0
- package/resources/ws-private/ws-private.js.map +1 -0
- package/resources/ws-private/ws-private.mjs +4 -0
- package/resources/ws-private/ws-private.mjs.map +1 -0
- package/resources/ws-private/ws.d.mts +85 -0
- package/resources/ws-private/ws.d.mts.map +1 -0
- package/resources/ws-private/ws.d.ts +85 -0
- package/resources/ws-private/ws.d.ts.map +1 -0
- package/resources/ws-private/ws.js +433 -0
- package/resources/ws-private/ws.js.map +1 -0
- package/resources/ws-private/ws.mjs +428 -0
- package/resources/ws-private/ws.mjs.map +1 -0
- package/resources/ws-private.d.mts +2 -0
- package/resources/ws-private.d.mts.map +1 -0
- package/resources/ws-private.d.ts +2 -0
- package/resources/ws-private.d.ts.map +1 -0
- package/resources/ws-private.js +5 -0
- package/resources/ws-private.js.map +1 -0
- package/resources/ws-private.mjs +2 -0
- package/resources/ws-private.mjs.map +1 -0
- package/resources/ws-public/index.d.mts +3 -0
- package/resources/ws-public/index.d.mts.map +1 -0
- package/resources/ws-public/index.d.ts +3 -0
- package/resources/ws-public/index.d.ts.map +1 -0
- package/resources/ws-public/index.js +6 -0
- package/resources/ws-public/index.js.map +1 -0
- package/resources/ws-public/index.mjs +2 -0
- package/resources/ws-public/index.mjs.map +1 -0
- package/resources/ws-public/internal-base.d.mts +58 -0
- package/resources/ws-public/internal-base.d.mts.map +1 -0
- package/resources/ws-public/internal-base.d.ts +58 -0
- package/resources/ws-public/internal-base.d.ts.map +1 -0
- package/resources/ws-public/internal-base.js +51 -0
- package/resources/ws-public/internal-base.js.map +1 -0
- package/resources/ws-public/internal-base.mjs +45 -0
- package/resources/ws-public/internal-base.mjs.map +1 -0
- package/resources/ws-public/ws-public.d.mts +427 -0
- package/resources/ws-public/ws-public.d.mts.map +1 -0
- package/resources/ws-public/ws-public.d.ts +427 -0
- package/resources/ws-public/ws-public.d.ts.map +1 -0
- package/resources/ws-public/ws-public.js +8 -0
- package/resources/ws-public/ws-public.js.map +1 -0
- package/resources/ws-public/ws-public.mjs +4 -0
- package/resources/ws-public/ws-public.mjs.map +1 -0
- package/resources/ws-public/ws.d.mts +85 -0
- package/resources/ws-public/ws.d.mts.map +1 -0
- package/resources/ws-public/ws.d.ts +85 -0
- package/resources/ws-public/ws.d.ts.map +1 -0
- package/resources/ws-public/ws.js +428 -0
- package/resources/ws-public/ws.js.map +1 -0
- package/resources/ws-public/ws.mjs +423 -0
- package/resources/ws-public/ws.mjs.map +1 -0
- package/resources/ws-public.d.mts +2 -0
- package/resources/ws-public.d.mts.map +1 -0
- package/resources/ws-public.d.ts +2 -0
- package/resources/ws-public.d.ts.map +1 -0
- package/resources/ws-public.js +5 -0
- package/resources/ws-public.js.map +1 -0
- package/resources/ws-public.mjs +2 -0
- package/resources/ws-public.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1112 -0
- package/src/core/EventEmitter.ts +114 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +91 -0
- package/src/core/error.ts +182 -0
- package/src/core/pagination.ts +195 -0
- package/src/core/resource.ts +10 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +24 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +92 -0
- package/src/internal/errors.ts +32 -0
- package/src/internal/headers.ts +96 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +92 -0
- package/src/internal/shim-types.ts +25 -0
- package/src/internal/shims.ts +106 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +94 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +39 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +17 -0
- package/src/internal/utils/log.ts +125 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +6 -0
- package/src/internal/utils/sleep.ts +2 -0
- package/src/internal/utils/uuid.ts +19 -0
- package/src/internal/utils/values.ts +104 -0
- package/src/internal/utils.ts +8 -0
- package/src/internal/ws.ts +68 -0
- package/src/lib/index.ts +4 -0
- package/src/lib/jsonParseFloat.ts +73 -0
- package/src/lib/jwtAuth.ts +39 -0
- package/src/lib/ws.ts +282 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/accounts.ts +59 -0
- package/src/resources/api-keys.ts +40 -0
- package/src/resources/candles.ts +392 -0
- package/src/resources/deposits.ts +484 -0
- package/src/resources/index.ts +102 -0
- package/src/resources/orderbooks.ts +170 -0
- package/src/resources/orders.ts +1102 -0
- package/src/resources/tickers.ts +233 -0
- package/src/resources/trades.ts +127 -0
- package/src/resources/trading-pairs.ts +120 -0
- package/src/resources/travel-rule.ts +181 -0
- package/src/resources/wallet-status.ts +87 -0
- package/src/resources/withdraws.ts +734 -0
- package/src/resources/ws-private/index.ts +3 -0
- package/src/resources/ws-private/internal-base.ts +99 -0
- package/src/resources/ws-private/ws-private.ts +283 -0
- package/src/resources/ws-private/ws.ts +529 -0
- package/src/resources/ws-private.ts +2 -0
- package/src/resources/ws-public/index.ts +3 -0
- package/src/resources/ws-public/internal-base.ts +99 -0
- package/src/resources/ws-public/ws-public.ts +561 -0
- package/src/resources/ws-public/ws.ts +525 -0
- package/src/resources/ws-public.ts +2 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
package/lib/ws.mjs
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import * as WS from 'ws';
|
|
2
|
+
import { uuid4 } from "../internal/utils/uuid.mjs";
|
|
3
|
+
import { createJwtToken } from "./jwtAuth.mjs";
|
|
4
|
+
import { jsonParseFloat } from "./jsonParseFloat.mjs";
|
|
5
|
+
import { buildURL as buildPublicURL } from "../resources/ws-public/internal-base.mjs";
|
|
6
|
+
import { buildURL as buildPrivateURL } from "../resources/ws-private/internal-base.mjs";
|
|
7
|
+
function buildSubscriptionMessage(types) {
|
|
8
|
+
const fields = [{ ticket: uuid4() }];
|
|
9
|
+
for (const t of types) {
|
|
10
|
+
if ('codes' in t && t.codes) {
|
|
11
|
+
fields.push({ type: t.type, codes: t.codes });
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
fields.push({ type: t.type });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return JSON.stringify(fields);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Manages a WebSocket stream as an AsyncIterable.
|
|
21
|
+
*
|
|
22
|
+
* Use with `for await (const event of manager) { ... }`.
|
|
23
|
+
*/
|
|
24
|
+
export class WsStreamManager {
|
|
25
|
+
constructor(client, types, isPrivate, opts = {}) {
|
|
26
|
+
this._currentWs = null;
|
|
27
|
+
this.client = client;
|
|
28
|
+
this.types = types;
|
|
29
|
+
this.isPrivate = isPrivate;
|
|
30
|
+
this.maxRetries = opts.maxRetries ?? 5;
|
|
31
|
+
this.retryDelayMs = opts.retryDelayMs ?? 1000;
|
|
32
|
+
if (opts.onDisconnect)
|
|
33
|
+
this.onDisconnect = opts.onDisconnect;
|
|
34
|
+
if (opts.onReconnect)
|
|
35
|
+
this.onReconnect = opts.onReconnect;
|
|
36
|
+
}
|
|
37
|
+
/** Closes the current WebSocket connection. */
|
|
38
|
+
close() {
|
|
39
|
+
if (this._currentWs &&
|
|
40
|
+
(this._currentWs.readyState === WS.WebSocket.OPEN ||
|
|
41
|
+
this._currentWs.readyState === WS.WebSocket.CONNECTING)) {
|
|
42
|
+
this._currentWs.close(1000, 'close() called');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
[Symbol.asyncIterator]() {
|
|
46
|
+
return this._iterate();
|
|
47
|
+
}
|
|
48
|
+
async *_iterate() {
|
|
49
|
+
let retries = 0;
|
|
50
|
+
while (true) {
|
|
51
|
+
const queue = [];
|
|
52
|
+
let resolve = null;
|
|
53
|
+
let reject = null;
|
|
54
|
+
let done = false;
|
|
55
|
+
let closeCode = 1000;
|
|
56
|
+
let closeReason = '';
|
|
57
|
+
const ws = await this._connect();
|
|
58
|
+
this._currentWs = ws;
|
|
59
|
+
ws.on('message', (data) => {
|
|
60
|
+
try {
|
|
61
|
+
const parsed = jsonParseFloat(data.toString());
|
|
62
|
+
queue.push(parsed);
|
|
63
|
+
resolve?.();
|
|
64
|
+
resolve = null;
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// ignore JSON parse errors
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
ws.on('close', (code, reason) => {
|
|
71
|
+
done = true;
|
|
72
|
+
closeCode = code;
|
|
73
|
+
closeReason = reason.toString();
|
|
74
|
+
resolve?.();
|
|
75
|
+
resolve = null;
|
|
76
|
+
});
|
|
77
|
+
ws.on('error', (err) => {
|
|
78
|
+
done = true;
|
|
79
|
+
reject?.(err);
|
|
80
|
+
reject = null;
|
|
81
|
+
resolve?.();
|
|
82
|
+
resolve = null;
|
|
83
|
+
});
|
|
84
|
+
try {
|
|
85
|
+
while (!done || queue.length > 0) {
|
|
86
|
+
if (queue.length === 0) {
|
|
87
|
+
await new Promise((res, rej) => {
|
|
88
|
+
resolve = res;
|
|
89
|
+
reject = rej;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
while (queue.length > 0) {
|
|
93
|
+
yield queue.shift();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
this._currentWs = null;
|
|
99
|
+
if (ws.readyState === WS.WebSocket.OPEN || ws.readyState === WS.WebSocket.CONNECTING) {
|
|
100
|
+
ws.close();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// normal close (1000, 1001) — end the stream
|
|
104
|
+
if (closeCode === 1000 || closeCode === 1001) {
|
|
105
|
+
this.onDisconnect?.(closeCode, closeReason);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
// attempt reconnect
|
|
109
|
+
this.onDisconnect?.(closeCode, closeReason);
|
|
110
|
+
if (retries >= this.maxRetries) {
|
|
111
|
+
throw new Error(`WebSocket disconnected (code=${closeCode}, reason=${closeReason}) after ${retries} retries`);
|
|
112
|
+
}
|
|
113
|
+
retries++;
|
|
114
|
+
await new Promise((r) => setTimeout(r, this.retryDelayMs));
|
|
115
|
+
this.onReconnect?.();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async _connect() {
|
|
119
|
+
const url = this.isPrivate ? buildPrivateURL(this.client) : buildPublicURL(this.client);
|
|
120
|
+
const headers = {};
|
|
121
|
+
if (this.isPrivate) {
|
|
122
|
+
const { accessKey, secretKey } = this.client;
|
|
123
|
+
if (!accessKey || !secretKey) {
|
|
124
|
+
throw new Error('Private WebSocket requires accessKey and secretKey');
|
|
125
|
+
}
|
|
126
|
+
const token = createJwtToken(accessKey, secretKey);
|
|
127
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
128
|
+
}
|
|
129
|
+
return new Promise((resolve, reject) => {
|
|
130
|
+
const ws = new WS.WebSocket(url.toString(), { headers });
|
|
131
|
+
const onOpen = () => {
|
|
132
|
+
ws.removeListener('error', onError);
|
|
133
|
+
ws.send(buildSubscriptionMessage(this.types));
|
|
134
|
+
resolve(ws);
|
|
135
|
+
};
|
|
136
|
+
const onError = (err) => {
|
|
137
|
+
ws.removeListener('open', onOpen);
|
|
138
|
+
reject(err);
|
|
139
|
+
};
|
|
140
|
+
ws.once('open', onOpen);
|
|
141
|
+
ws.once('error', onError);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Convenience API for WebSocket streams.
|
|
147
|
+
*
|
|
148
|
+
* Start a stream with `client.wsStream.ticker(['KRW-BTC'])` and
|
|
149
|
+
* receive events using `for await (const event of ...)`.
|
|
150
|
+
*/
|
|
151
|
+
export class WsStream {
|
|
152
|
+
constructor(client) {
|
|
153
|
+
this.client = client;
|
|
154
|
+
}
|
|
155
|
+
/** Subscribe to the ticker (current price) stream. */
|
|
156
|
+
ticker(codes, opts) {
|
|
157
|
+
return new WsStreamManager(this.client, [{ type: 'ticker', codes }], false, opts);
|
|
158
|
+
}
|
|
159
|
+
/** Subscribe to the trade (executed order) stream. */
|
|
160
|
+
trade(codes, opts) {
|
|
161
|
+
return new WsStreamManager(this.client, [{ type: 'trade', codes }], false, opts);
|
|
162
|
+
}
|
|
163
|
+
/** Subscribe to the orderbook stream. */
|
|
164
|
+
orderbook(codes, opts) {
|
|
165
|
+
return new WsStreamManager(this.client, [{ type: 'orderbook', codes }], false, opts);
|
|
166
|
+
}
|
|
167
|
+
/** Subscribe to the candle stream. */
|
|
168
|
+
candle(codes, opts) {
|
|
169
|
+
const { interval = '1m', ...streamOpts } = opts ?? {};
|
|
170
|
+
return new WsStreamManager(this.client, [{ type: `candle.${interval}`, codes }], false, streamOpts);
|
|
171
|
+
}
|
|
172
|
+
/** Subscribe to the myOrder (my orders) stream. Requires authentication. */
|
|
173
|
+
myOrder(codes, opts) {
|
|
174
|
+
return new WsStreamManager(this.client, [{ type: 'myOrder', codes }], true, opts);
|
|
175
|
+
}
|
|
176
|
+
/** Subscribe to the myAsset (my assets) stream. Requires authentication. */
|
|
177
|
+
myAsset(opts) {
|
|
178
|
+
return new WsStreamManager(this.client, [{ type: 'myAsset' }], true, opts);
|
|
179
|
+
}
|
|
180
|
+
/** Subscribe to multiple public streams at once. */
|
|
181
|
+
subscribe(opts) {
|
|
182
|
+
const { ticker, trade, orderbook, candle, maxRetries, retryDelayMs, onDisconnect, onReconnect } = opts;
|
|
183
|
+
const types = [];
|
|
184
|
+
if (ticker)
|
|
185
|
+
types.push({ type: 'ticker', codes: ticker });
|
|
186
|
+
if (trade)
|
|
187
|
+
types.push({ type: 'trade', codes: trade });
|
|
188
|
+
if (orderbook)
|
|
189
|
+
types.push({ type: 'orderbook', codes: orderbook });
|
|
190
|
+
if (candle)
|
|
191
|
+
types.push({ type: `candle.${candle.interval ?? '1m'}`, codes: candle.codes });
|
|
192
|
+
const streamOpts = {};
|
|
193
|
+
if (maxRetries !== undefined)
|
|
194
|
+
streamOpts.maxRetries = maxRetries;
|
|
195
|
+
if (retryDelayMs !== undefined)
|
|
196
|
+
streamOpts.retryDelayMs = retryDelayMs;
|
|
197
|
+
if (onDisconnect)
|
|
198
|
+
streamOpts.onDisconnect = onDisconnect;
|
|
199
|
+
if (onReconnect)
|
|
200
|
+
streamOpts.onReconnect = onReconnect;
|
|
201
|
+
return new WsStreamManager(this.client, types, false, streamOpts);
|
|
202
|
+
}
|
|
203
|
+
/** Subscribe to multiple private streams at once. Requires authentication. */
|
|
204
|
+
subscribePrivate(opts) {
|
|
205
|
+
const { myOrder, myAsset, maxRetries, retryDelayMs, onDisconnect, onReconnect } = opts;
|
|
206
|
+
const types = [];
|
|
207
|
+
if (myOrder)
|
|
208
|
+
types.push({ type: 'myOrder', codes: myOrder });
|
|
209
|
+
if (myAsset)
|
|
210
|
+
types.push({ type: 'myAsset' });
|
|
211
|
+
const streamOpts = {};
|
|
212
|
+
if (maxRetries !== undefined)
|
|
213
|
+
streamOpts.maxRetries = maxRetries;
|
|
214
|
+
if (retryDelayMs !== undefined)
|
|
215
|
+
streamOpts.retryDelayMs = retryDelayMs;
|
|
216
|
+
if (onDisconnect)
|
|
217
|
+
streamOpts.onDisconnect = onDisconnect;
|
|
218
|
+
if (onReconnect)
|
|
219
|
+
streamOpts.onReconnect = onReconnect;
|
|
220
|
+
return new WsStreamManager(this.client, types, true, streamOpts);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=ws.mjs.map
|
package/lib/ws.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws.mjs","sourceRoot":"","sources":["../src/lib/ws.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,MAAM,IAAI;OACjB,EAAE,KAAK,EAAE;OACT,EAAE,cAAc,EAAE;OAClB,EAAE,cAAc,EAAE;OAClB,EAAE,QAAQ,IAAI,cAAc,EAAE;OAC9B,EAAE,QAAQ,IAAI,eAAe,EAAE;AA0BtC,SAAS,wBAAwB,CAAC,KAA4B;IAC5D,MAAM,MAAM,GAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,I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json
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@upbit-official/upbit-sdk",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "The official TypeScript library for the Upbit API",
|
|
5
|
+
"author": "Upbit <open-api@upbit.com>",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"type": "commonjs",
|
|
9
|
+
"repository": "github:upbit-official/upbit-sdk-typescript",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=22.0.0"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"**/*"
|
|
16
|
+
],
|
|
17
|
+
"private": false,
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"ws": "^8.18.0"
|
|
24
|
+
},
|
|
25
|
+
"overrides": {
|
|
26
|
+
"minimatch": "^9.0.5"
|
|
27
|
+
},
|
|
28
|
+
"resolutions": {
|
|
29
|
+
"minimatch": "^9.0.5"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"default": "./index.js"
|
|
36
|
+
},
|
|
37
|
+
"types": "./index.d.mts",
|
|
38
|
+
"default": "./index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./api-promise": {
|
|
41
|
+
"import": "./api-promise.mjs",
|
|
42
|
+
"require": "./api-promise.js"
|
|
43
|
+
},
|
|
44
|
+
"./api-promise.js": {
|
|
45
|
+
"default": "./api-promise.js"
|
|
46
|
+
},
|
|
47
|
+
"./api-promise.mjs": {
|
|
48
|
+
"default": "./api-promise.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./client": {
|
|
51
|
+
"import": "./client.mjs",
|
|
52
|
+
"require": "./client.js"
|
|
53
|
+
},
|
|
54
|
+
"./client.js": {
|
|
55
|
+
"default": "./client.js"
|
|
56
|
+
},
|
|
57
|
+
"./client.mjs": {
|
|
58
|
+
"default": "./client.mjs"
|
|
59
|
+
},
|
|
60
|
+
"./core/*.mjs": {
|
|
61
|
+
"default": "./core/*.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./core/*.js": {
|
|
64
|
+
"default": "./core/*.js"
|
|
65
|
+
},
|
|
66
|
+
"./core/*": {
|
|
67
|
+
"import": "./core/*.mjs",
|
|
68
|
+
"require": "./core/*.js"
|
|
69
|
+
},
|
|
70
|
+
"./error": {
|
|
71
|
+
"import": "./error.mjs",
|
|
72
|
+
"require": "./error.js"
|
|
73
|
+
},
|
|
74
|
+
"./error.js": {
|
|
75
|
+
"default": "./error.js"
|
|
76
|
+
},
|
|
77
|
+
"./error.mjs": {
|
|
78
|
+
"default": "./error.mjs"
|
|
79
|
+
},
|
|
80
|
+
"./index": {
|
|
81
|
+
"import": "./index.mjs",
|
|
82
|
+
"require": "./index.js"
|
|
83
|
+
},
|
|
84
|
+
"./index.js": {
|
|
85
|
+
"default": "./index.js"
|
|
86
|
+
},
|
|
87
|
+
"./index.mjs": {
|
|
88
|
+
"default": "./index.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./lib/*.mjs": {
|
|
91
|
+
"default": "./lib/*.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./lib/*.js": {
|
|
94
|
+
"default": "./lib/*.js"
|
|
95
|
+
},
|
|
96
|
+
"./lib/*": {
|
|
97
|
+
"import": "./lib/*.mjs",
|
|
98
|
+
"require": "./lib/*.js"
|
|
99
|
+
},
|
|
100
|
+
"./pagination": {
|
|
101
|
+
"import": "./pagination.mjs",
|
|
102
|
+
"require": "./pagination.js"
|
|
103
|
+
},
|
|
104
|
+
"./pagination.js": {
|
|
105
|
+
"default": "./pagination.js"
|
|
106
|
+
},
|
|
107
|
+
"./pagination.mjs": {
|
|
108
|
+
"default": "./pagination.mjs"
|
|
109
|
+
},
|
|
110
|
+
"./resource": {
|
|
111
|
+
"import": "./resource.mjs",
|
|
112
|
+
"require": "./resource.js"
|
|
113
|
+
},
|
|
114
|
+
"./resource.js": {
|
|
115
|
+
"default": "./resource.js"
|
|
116
|
+
},
|
|
117
|
+
"./resource.mjs": {
|
|
118
|
+
"default": "./resource.mjs"
|
|
119
|
+
},
|
|
120
|
+
"./resources/*.mjs": {
|
|
121
|
+
"default": "./resources/*.mjs"
|
|
122
|
+
},
|
|
123
|
+
"./resources/*.js": {
|
|
124
|
+
"default": "./resources/*.js"
|
|
125
|
+
},
|
|
126
|
+
"./resources/*": {
|
|
127
|
+
"import": "./resources/*.mjs",
|
|
128
|
+
"require": "./resources/*.js"
|
|
129
|
+
},
|
|
130
|
+
"./resources": {
|
|
131
|
+
"import": "./resources.mjs",
|
|
132
|
+
"require": "./resources.js"
|
|
133
|
+
},
|
|
134
|
+
"./resources.js": {
|
|
135
|
+
"default": "./resources.js"
|
|
136
|
+
},
|
|
137
|
+
"./resources.mjs": {
|
|
138
|
+
"default": "./resources.mjs"
|
|
139
|
+
},
|
|
140
|
+
"./uploads": {
|
|
141
|
+
"import": "./uploads.mjs",
|
|
142
|
+
"require": "./uploads.js"
|
|
143
|
+
},
|
|
144
|
+
"./uploads.js": {
|
|
145
|
+
"default": "./uploads.js"
|
|
146
|
+
},
|
|
147
|
+
"./uploads.mjs": {
|
|
148
|
+
"default": "./uploads.mjs"
|
|
149
|
+
},
|
|
150
|
+
"./version": {
|
|
151
|
+
"import": "./version.mjs",
|
|
152
|
+
"require": "./version.js"
|
|
153
|
+
},
|
|
154
|
+
"./version.js": {
|
|
155
|
+
"default": "./version.js"
|
|
156
|
+
},
|
|
157
|
+
"./version.mjs": {
|
|
158
|
+
"default": "./version.mjs"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"scripts": {
|
|
162
|
+
"test": "./scripts/test",
|
|
163
|
+
"build": "./scripts/build",
|
|
164
|
+
"format": "./scripts/format",
|
|
165
|
+
"tsn": "ts-node -r tsconfig-paths/register",
|
|
166
|
+
"lint": "./scripts/lint",
|
|
167
|
+
"fix": "./scripts/format"
|
|
168
|
+
}
|
|
169
|
+
}
|
package/pagination.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.mts","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":""}
|
package/pagination.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":""}
|
package/pagination.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/pagination instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/pagination.js"), exports);
|
|
6
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,+DAAkC"}
|
package/pagination.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.mjs","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":""}
|
package/resource.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.mts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":""}
|
package/resource.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":""}
|
package/resource.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/resource instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/resource.js"), exports);
|
|
6
|
+
//# sourceMappingURL=resource.js.map
|
package/resource.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,6DAAgC"}
|
package/resource.mjs
ADDED
package/resource.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Accounts extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get Account Balances
|
|
7
|
+
*
|
|
8
|
+
* GET /v1/accounts
|
|
9
|
+
*
|
|
10
|
+
* - docs(kr): https://docs.upbit.com/kr/reference/get-balance
|
|
11
|
+
* - docs(global): https://global-docs.upbit.com/reference/get-balance
|
|
12
|
+
*/
|
|
13
|
+
list(options?: RequestOptions): APIPromise<AccountListResponse>;
|
|
14
|
+
}
|
|
15
|
+
export type AccountListResponse = Array<AccountListResponse.AccountListResponseItem>;
|
|
16
|
+
export declare namespace AccountListResponse {
|
|
17
|
+
interface AccountListResponseItem {
|
|
18
|
+
/**
|
|
19
|
+
* Average buy price of the asset.
|
|
20
|
+
*/
|
|
21
|
+
avg_buy_price: string;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether the average buy price has been modified.
|
|
24
|
+
*/
|
|
25
|
+
avg_buy_price_modified: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Available amount or volume for orders. For digital assets, this represents the
|
|
28
|
+
* available quantity. For fiat currency, this represents the available amount.
|
|
29
|
+
*/
|
|
30
|
+
balance: string;
|
|
31
|
+
/**
|
|
32
|
+
* Currency code to be queried.
|
|
33
|
+
*/
|
|
34
|
+
currency: string;
|
|
35
|
+
/**
|
|
36
|
+
* Amount or quantity locked by pending orders or withdrawals.
|
|
37
|
+
*/
|
|
38
|
+
locked: string;
|
|
39
|
+
/**
|
|
40
|
+
* Currency unit used as the basis for avg_buy_price.
|
|
41
|
+
*/
|
|
42
|
+
unit_currency: string;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export declare namespace Accounts {
|
|
46
|
+
export { type AccountListResponse as AccountListResponse };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=accounts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"OACO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGhE;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;AAErF,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,uBAAuB;QACtC;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,sBAAsB,EAAE,OAAO,CAAC;QAEhC;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Accounts extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get Account Balances
|
|
7
|
+
*
|
|
8
|
+
* GET /v1/accounts
|
|
9
|
+
*
|
|
10
|
+
* - docs(kr): https://docs.upbit.com/kr/reference/get-balance
|
|
11
|
+
* - docs(global): https://global-docs.upbit.com/reference/get-balance
|
|
12
|
+
*/
|
|
13
|
+
list(options?: RequestOptions): APIPromise<AccountListResponse>;
|
|
14
|
+
}
|
|
15
|
+
export type AccountListResponse = Array<AccountListResponse.AccountListResponseItem>;
|
|
16
|
+
export declare namespace AccountListResponse {
|
|
17
|
+
interface AccountListResponseItem {
|
|
18
|
+
/**
|
|
19
|
+
* Average buy price of the asset.
|
|
20
|
+
*/
|
|
21
|
+
avg_buy_price: string;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether the average buy price has been modified.
|
|
24
|
+
*/
|
|
25
|
+
avg_buy_price_modified: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Available amount or volume for orders. For digital assets, this represents the
|
|
28
|
+
* available quantity. For fiat currency, this represents the available amount.
|
|
29
|
+
*/
|
|
30
|
+
balance: string;
|
|
31
|
+
/**
|
|
32
|
+
* Currency code to be queried.
|
|
33
|
+
*/
|
|
34
|
+
currency: string;
|
|
35
|
+
/**
|
|
36
|
+
* Amount or quantity locked by pending orders or withdrawals.
|
|
37
|
+
*/
|
|
38
|
+
locked: string;
|
|
39
|
+
/**
|
|
40
|
+
* Currency unit used as the basis for avg_buy_price.
|
|
41
|
+
*/
|
|
42
|
+
unit_currency: string;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export declare namespace Accounts {
|
|
46
|
+
export { type AccountListResponse as AccountListResponse };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"OACO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGhE;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;AAErF,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,uBAAuB;QACtC;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,sBAAsB,EAAE,OAAO,CAAC;QAEhC;;;WAGG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Accounts = void 0;
|
|
4
|
+
const resource_1 = require("../core/resource.js");
|
|
5
|
+
class Accounts extends resource_1.APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get Account Balances
|
|
8
|
+
*
|
|
9
|
+
* GET /v1/accounts
|
|
10
|
+
*
|
|
11
|
+
* - docs(kr): https://docs.upbit.com/kr/reference/get-balance
|
|
12
|
+
* - docs(global): https://global-docs.upbit.com/reference/get-balance
|
|
13
|
+
*/
|
|
14
|
+
list(options) {
|
|
15
|
+
return this._client.get('/v1/accounts', options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Accounts = Accounts;
|
|
19
|
+
//# sourceMappingURL=accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":";;;AACA,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF;AAZD,4BAYC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
export class Accounts extends APIResource {
|
|
3
|
+
/**
|
|
4
|
+
* Get Account Balances
|
|
5
|
+
*
|
|
6
|
+
* GET /v1/accounts
|
|
7
|
+
*
|
|
8
|
+
* - docs(kr): https://docs.upbit.com/kr/reference/get-balance
|
|
9
|
+
* - docs(global): https://global-docs.upbit.com/reference/get-balance
|
|
10
|
+
*/
|
|
11
|
+
list(options) {
|
|
12
|
+
return this._client.get('/v1/accounts', options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=accounts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"OACO,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class APIKeys extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List API Keys
|
|
7
|
+
*
|
|
8
|
+
* GET /v1/api_keys
|
|
9
|
+
*
|
|
10
|
+
* - docs(kr): https://docs.upbit.com/kr/reference/list-api-keys
|
|
11
|
+
* - docs(global): https://global-docs.upbit.com/reference/list-api-keys
|
|
12
|
+
*/
|
|
13
|
+
list(options?: RequestOptions): APIPromise<APIKeyListResponse>;
|
|
14
|
+
}
|
|
15
|
+
export type APIKeyListResponse = Array<APIKeyListResponse.APIKeyListResponseItem>;
|
|
16
|
+
export declare namespace APIKeyListResponse {
|
|
17
|
+
interface APIKeyListResponseItem {
|
|
18
|
+
/**
|
|
19
|
+
* Access key of the API key.
|
|
20
|
+
*/
|
|
21
|
+
access_key: string;
|
|
22
|
+
/**
|
|
23
|
+
* Expiration timestamp of the access key.
|
|
24
|
+
*
|
|
25
|
+
* [Format] yyyy-MM-dd'T'HH:mm:ss+09:00
|
|
26
|
+
*/
|
|
27
|
+
expire_at: string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare namespace APIKeys {
|
|
31
|
+
export { type APIKeyListResponse as APIKeyListResponse };
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=api-keys.d.mts.map
|