@upbit-official/upbit-sdk 0.9.0 → 1.1.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/CHANGELOG.md +13 -0
- package/README.md +36 -16
- package/client.d.mts +13 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -4
- package/client.d.ts.map +1 -1
- package/client.js +26 -4
- package/client.js.map +1 -1
- package/client.mjs +26 -4
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +3 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -1
- package/index.d.ts.map +1 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shim-types.d.mts.map +1 -1
- package/internal/shim-types.d.ts.map +1 -1
- package/internal/shim-types.js.map +1 -1
- package/internal/shim-types.mjs.map +1 -1
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/sleep.d.mts.map +1 -1
- package/internal/utils/sleep.d.ts.map +1 -1
- package/internal/utils/sleep.js.map +1 -1
- package/internal/utils/sleep.mjs.map +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js.map +1 -1
- package/internal/ws-parser.d.mts +40 -0
- package/internal/ws-parser.d.mts.map +1 -0
- package/internal/ws-parser.d.ts +40 -0
- package/internal/ws-parser.d.ts.map +1 -0
- package/internal/ws-parser.js +125 -0
- package/internal/ws-parser.js.map +1 -0
- package/internal/ws-parser.mjs +118 -0
- package/internal/ws-parser.mjs.map +1 -0
- package/internal/ws-simple-types.d.mts +8 -0
- package/internal/ws-simple-types.d.mts.map +1 -0
- package/internal/ws-simple-types.d.ts +8 -0
- package/internal/ws-simple-types.d.ts.map +1 -0
- package/internal/ws-simple-types.js +3 -0
- package/internal/ws-simple-types.js.map +1 -0
- package/internal/ws-simple-types.mjs +2 -0
- package/internal/ws-simple-types.mjs.map +1 -0
- package/internal/ws.d.mts +1 -0
- package/internal/ws.d.mts.map +1 -1
- package/internal/ws.d.ts +1 -0
- package/internal/ws.d.ts.map +1 -1
- package/internal/ws.js.map +1 -1
- package/internal/ws.mjs.map +1 -1
- package/lib/index.d.mts +4 -2
- package/lib/index.d.mts.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/jsonParseFloat.d.mts +5 -5
- package/lib/jsonParseFloat.d.mts.map +1 -1
- package/lib/jsonParseFloat.d.ts +5 -5
- package/lib/jsonParseFloat.d.ts.map +1 -1
- package/lib/jsonParseFloat.js +31 -12
- package/lib/jsonParseFloat.js.map +1 -1
- package/lib/jsonParseFloat.mjs +31 -12
- package/lib/jsonParseFloat.mjs.map +1 -1
- package/lib/ws.d.mts +102 -15
- package/lib/ws.d.mts.map +1 -1
- package/lib/ws.d.ts +102 -15
- package/lib/ws.d.ts.map +1 -1
- package/lib/ws.js +208 -34
- package/lib/ws.js.map +1 -1
- package/lib/ws.mjs +204 -33
- package/lib/ws.mjs.map +1 -1
- package/package.json +15 -9
- package/resources/accounts.d.mts +2 -0
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +2 -0
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +2 -0
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +2 -0
- package/resources/accounts.mjs.map +1 -1
- package/resources/api-keys.d.mts +3 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +3 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +3 -1
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +3 -1
- package/resources/api-keys.mjs.map +1 -1
- package/resources/candles.d.mts +21 -1
- package/resources/candles.d.mts.map +1 -1
- package/resources/candles.d.ts +21 -1
- package/resources/candles.d.ts.map +1 -1
- package/resources/candles.js +12 -0
- package/resources/candles.js.map +1 -1
- package/resources/candles.mjs +12 -0
- package/resources/candles.mjs.map +1 -1
- package/resources/deposits.d.mts +18 -1
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +18 -1
- package/resources/deposits.d.ts.map +1 -1
- package/resources/deposits.js +18 -1
- package/resources/deposits.js.map +1 -1
- package/resources/deposits.mjs +18 -1
- package/resources/deposits.mjs.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -2
- package/resources/index.mjs.map +1 -1
- package/resources/orderbooks.d.mts +4 -0
- package/resources/orderbooks.d.mts.map +1 -1
- package/resources/orderbooks.d.ts +4 -0
- package/resources/orderbooks.d.ts.map +1 -1
- package/resources/orderbooks.js +4 -0
- package/resources/orderbooks.js.map +1 -1
- package/resources/orderbooks.mjs +4 -0
- package/resources/orderbooks.mjs.map +1 -1
- package/resources/orders.d.mts +12 -2
- package/resources/orders.d.mts.map +1 -1
- package/resources/orders.d.ts +12 -2
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +12 -2
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +12 -2
- package/resources/orders.mjs.map +1 -1
- package/resources/pockets.d.mts +509 -0
- package/resources/pockets.d.mts.map +1 -0
- package/resources/pockets.d.ts +509 -0
- package/resources/pockets.d.ts.map +1 -0
- package/resources/pockets.js +157 -0
- package/resources/pockets.js.map +1 -0
- package/resources/pockets.mjs +153 -0
- package/resources/pockets.mjs.map +1 -0
- package/resources/tickers.d.mts +6 -0
- package/resources/tickers.d.mts.map +1 -1
- package/resources/tickers.d.ts +6 -0
- package/resources/tickers.d.ts.map +1 -1
- package/resources/tickers.js +6 -0
- package/resources/tickers.js.map +1 -1
- package/resources/tickers.mjs +6 -0
- package/resources/tickers.mjs.map +1 -1
- package/resources/trades.d.mts +5 -3
- package/resources/trades.d.mts.map +1 -1
- package/resources/trades.d.ts +5 -3
- package/resources/trades.d.ts.map +1 -1
- package/resources/trades.js +5 -3
- package/resources/trades.js.map +1 -1
- package/resources/trades.mjs +5 -3
- package/resources/trades.mjs.map +1 -1
- package/resources/trading-pairs.d.mts +2 -0
- package/resources/trading-pairs.d.mts.map +1 -1
- package/resources/trading-pairs.d.ts +2 -0
- package/resources/trading-pairs.d.ts.map +1 -1
- package/resources/trading-pairs.js +2 -0
- package/resources/trading-pairs.js.map +1 -1
- package/resources/trading-pairs.mjs +2 -0
- package/resources/trading-pairs.mjs.map +1 -1
- package/resources/travel-rule.d.mts +6 -0
- package/resources/travel-rule.d.mts.map +1 -1
- package/resources/travel-rule.d.ts +6 -0
- package/resources/travel-rule.d.ts.map +1 -1
- package/resources/travel-rule.js +6 -0
- package/resources/travel-rule.js.map +1 -1
- package/resources/travel-rule.mjs +6 -0
- package/resources/travel-rule.mjs.map +1 -1
- package/resources/wallet-status.d.mts +2 -0
- package/resources/wallet-status.d.mts.map +1 -1
- package/resources/wallet-status.d.ts +2 -0
- package/resources/wallet-status.d.ts.map +1 -1
- package/resources/wallet-status.js +2 -0
- package/resources/wallet-status.js.map +1 -1
- package/resources/wallet-status.mjs +2 -0
- package/resources/wallet-status.mjs.map +1 -1
- package/resources/withdraws.d.mts +18 -1
- package/resources/withdraws.d.mts.map +1 -1
- package/resources/withdraws.d.ts +18 -1
- package/resources/withdraws.d.ts.map +1 -1
- package/resources/withdraws.js +18 -1
- package/resources/withdraws.js.map +1 -1
- package/resources/withdraws.mjs +18 -1
- package/resources/withdraws.mjs.map +1 -1
- package/resources/ws-info/index.d.mts +6 -0
- package/resources/ws-info/index.d.mts.map +1 -0
- package/resources/ws-info/index.d.ts +6 -0
- package/resources/ws-info/index.d.ts.map +1 -0
- package/resources/ws-info/index.js +6 -0
- package/resources/ws-info/index.js.map +1 -0
- package/resources/ws-info/index.mjs +2 -0
- package/resources/ws-info/index.mjs.map +1 -0
- package/resources/ws-info/internal-base.d.mts +63 -0
- package/resources/ws-info/internal-base.d.mts.map +1 -0
- package/resources/ws-info/internal-base.d.ts +63 -0
- package/resources/ws-info/internal-base.d.ts.map +1 -0
- package/resources/ws-info/internal-base.js +47 -0
- package/resources/ws-info/internal-base.js.map +1 -0
- package/resources/ws-info/internal-base.mjs +41 -0
- package/resources/ws-info/internal-base.mjs.map +1 -0
- package/resources/ws-info/ws-info.d.mts +1180 -0
- package/resources/ws-info/ws-info.d.mts.map +1 -0
- package/resources/ws-info/ws-info.d.ts +1180 -0
- package/resources/ws-info/ws-info.d.ts.map +1 -0
- package/resources/ws-info/ws-info.js +8 -0
- package/resources/ws-info/ws-info.js.map +1 -0
- package/resources/ws-info/ws-info.mjs +4 -0
- package/resources/ws-info/ws-info.mjs.map +1 -0
- package/resources/ws-info/ws.d.mts +91 -0
- package/resources/ws-info/ws.d.mts.map +1 -0
- package/resources/ws-info/ws.d.ts +91 -0
- package/resources/ws-info/ws.d.ts.map +1 -0
- package/resources/ws-info/ws.js +463 -0
- package/resources/ws-info/ws.js.map +1 -0
- package/resources/ws-info/ws.mjs +458 -0
- package/resources/ws-info/ws.mjs.map +1 -0
- package/resources/ws-info.d.mts +2 -0
- package/resources/ws-info.d.mts.map +1 -0
- package/resources/ws-info.d.ts +2 -0
- package/resources/ws-info.d.ts.map +1 -0
- package/resources/ws-info.js +5 -0
- package/resources/ws-info.js.map +1 -0
- package/resources/ws-info.mjs +2 -0
- package/resources/ws-info.mjs.map +1 -0
- package/resources/ws-private/index.d.mts +3 -1
- package/resources/ws-private/index.d.mts.map +1 -1
- package/resources/ws-private/index.d.ts +3 -1
- package/resources/ws-private/index.d.ts.map +1 -1
- package/resources/ws-private/index.js.map +1 -1
- package/resources/ws-private/index.mjs +1 -1
- package/resources/ws-private/index.mjs.map +1 -1
- package/resources/ws-private/internal-base.d.mts.map +1 -1
- package/resources/ws-private/internal-base.d.ts.map +1 -1
- package/resources/ws-private/internal-base.js.map +1 -1
- package/resources/ws-private/internal-base.mjs.map +1 -1
- package/resources/ws-private/ws-private.d.mts +301 -9
- package/resources/ws-private/ws-private.d.mts.map +1 -1
- package/resources/ws-private/ws-private.d.ts +301 -9
- package/resources/ws-private/ws-private.d.ts.map +1 -1
- package/resources/ws-private/ws-private.js.map +1 -1
- package/resources/ws-private/ws-private.mjs.map +1 -1
- package/resources/ws-private/ws.d.mts +2 -2
- package/resources/ws-private/ws.d.mts.map +1 -1
- package/resources/ws-private/ws.d.ts +2 -2
- package/resources/ws-private/ws.d.ts.map +1 -1
- package/resources/ws-private/ws.js +15 -20
- package/resources/ws-private/ws.js.map +1 -1
- package/resources/ws-private/ws.mjs +15 -20
- package/resources/ws-private/ws.mjs.map +1 -1
- package/resources/ws-private.js.map +1 -1
- package/resources/ws-public/index.d.mts +3 -1
- package/resources/ws-public/index.d.mts.map +1 -1
- package/resources/ws-public/index.d.ts +3 -1
- package/resources/ws-public/index.d.ts.map +1 -1
- package/resources/ws-public/index.js.map +1 -1
- package/resources/ws-public/index.mjs +1 -1
- package/resources/ws-public/index.mjs.map +1 -1
- package/resources/ws-public/internal-base.d.mts.map +1 -1
- package/resources/ws-public/internal-base.d.ts.map +1 -1
- package/resources/ws-public/internal-base.js.map +1 -1
- package/resources/ws-public/internal-base.mjs.map +1 -1
- package/resources/ws-public/ws-public.d.mts +355 -5
- package/resources/ws-public/ws-public.d.mts.map +1 -1
- package/resources/ws-public/ws-public.d.ts +355 -5
- package/resources/ws-public/ws-public.d.ts.map +1 -1
- package/resources/ws-public/ws-public.js.map +1 -1
- package/resources/ws-public/ws-public.mjs.map +1 -1
- package/resources/ws-public/ws.d.mts +2 -2
- package/resources/ws-public/ws.d.mts.map +1 -1
- package/resources/ws-public/ws.d.ts +2 -2
- package/resources/ws-public/ws.d.ts.map +1 -1
- package/resources/ws-public/ws.js +15 -20
- package/resources/ws-public/ws.js.map +1 -1
- package/resources/ws-public/ws.mjs +15 -20
- package/resources/ws-public/ws.mjs.map +1 -1
- package/resources/ws-public.js.map +1 -1
- package/src/client.ts +141 -5
- package/src/core/api-promise.ts +0 -1
- package/src/core/error.ts +0 -1
- package/src/core/pagination.ts +0 -1
- package/src/core/resource.ts +0 -1
- package/src/index.ts +24 -2
- package/src/internal/builtin-types.ts +0 -1
- package/src/internal/errors.ts +0 -1
- package/src/internal/headers.ts +0 -1
- package/src/internal/parse.ts +0 -1
- package/src/internal/request-options.ts +0 -1
- package/src/internal/shim-types.ts +0 -1
- package/src/internal/shims.ts +0 -1
- package/src/internal/types.ts +0 -1
- package/src/internal/utils/base64.ts +0 -1
- package/src/internal/utils/env.ts +0 -1
- package/src/internal/utils/log.ts +0 -1
- package/src/internal/utils/query.ts +0 -1
- package/src/internal/utils/sleep.ts +0 -1
- package/src/internal/utils/uuid.ts +0 -1
- package/src/internal/utils/values.ts +0 -1
- package/src/internal/utils.ts +0 -1
- package/src/internal/ws-parser.ts +164 -0
- package/src/internal/ws-simple-types.ts +34 -0
- package/src/internal/ws.ts +1 -0
- package/src/lib/index.ts +17 -2
- package/src/lib/jsonParseFloat.ts +38 -12
- package/src/lib/ws.ts +367 -55
- package/src/resources/accounts.ts +2 -1
- package/src/resources/api-keys.ts +3 -2
- package/src/resources/candles.ts +22 -2
- package/src/resources/deposits.ts +18 -2
- package/src/resources/index.ts +65 -3
- package/src/resources/orderbooks.ts +4 -1
- package/src/resources/orders.ts +12 -3
- package/src/resources/pockets.ts +639 -0
- package/src/resources/tickers.ts +6 -1
- package/src/resources/trades.ts +5 -4
- package/src/resources/trading-pairs.ts +2 -1
- package/src/resources/travel-rule.ts +6 -1
- package/src/resources/wallet-status.ts +2 -1
- package/src/resources/withdraws.ts +18 -2
- package/src/resources/ws-info/index.ts +44 -0
- package/src/resources/ws-info/internal-base.ts +96 -0
- package/src/resources/ws-info/ws-info.ts +1855 -0
- package/src/resources/ws-info/ws.ts +574 -0
- package/src/resources/ws-info.ts +1 -0
- package/src/resources/ws-private/index.ts +12 -2
- package/src/resources/ws-private/internal-base.ts +0 -2
- package/src/resources/ws-private/ws-private.ts +419 -18
- package/src/resources/ws-private/ws.ts +16 -24
- package/src/resources/ws-private.ts +0 -1
- package/src/resources/ws-public/index.ts +16 -2
- package/src/resources/ws-public/internal-base.ts +0 -2
- package/src/resources/ws-public/ws-public.ts +459 -5
- package/src/resources/ws-public/ws.ts +16 -24
- package/src/resources/ws-public.ts +0 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,12 +1,307 @@
|
|
|
1
|
+
import type { WebSocketMessage } from "../../internal/ws-parser.mjs";
|
|
2
|
+
import type { WsListSubscriptionsResponse } from "../../lib/ws.mjs";
|
|
1
3
|
import { APIResource } from "../../core/resource.mjs";
|
|
4
|
+
import * as WsPrivateAPI from "./ws-private.mjs";
|
|
2
5
|
export declare class WsPrivate extends APIResource {
|
|
3
6
|
}
|
|
7
|
+
export interface Announcement {
|
|
8
|
+
/**
|
|
9
|
+
* Data type
|
|
10
|
+
*/
|
|
11
|
+
type: 'announcement';
|
|
12
|
+
/**
|
|
13
|
+
* Announcement body in Markdown. Included only when include_body is true and may
|
|
14
|
+
* be null for large bodies.
|
|
15
|
+
*/
|
|
16
|
+
body?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Announcement category
|
|
19
|
+
*/
|
|
20
|
+
category?: AnnouncementCategory;
|
|
21
|
+
/**
|
|
22
|
+
* Announcement event type
|
|
23
|
+
*/
|
|
24
|
+
event_type?: AnnouncementEventType;
|
|
25
|
+
/**
|
|
26
|
+
* First publication time (KST, ISO 8601)
|
|
27
|
+
*/
|
|
28
|
+
first_listed_at?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Latest publication time (KST, ISO 8601)
|
|
31
|
+
*/
|
|
32
|
+
listed_at?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Stream type (announcement supports realtime only)
|
|
35
|
+
*/
|
|
36
|
+
stream_type?: 'REALTIME';
|
|
37
|
+
/**
|
|
38
|
+
* Timestamp (ms)
|
|
39
|
+
*/
|
|
40
|
+
timestamp?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Announcement title
|
|
43
|
+
*/
|
|
44
|
+
title?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Announcement detail page URL
|
|
47
|
+
*/
|
|
48
|
+
url?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Announcement unique ID
|
|
51
|
+
*/
|
|
52
|
+
uuid?: string;
|
|
53
|
+
}
|
|
4
54
|
/**
|
|
5
|
-
*
|
|
6
|
-
* required)
|
|
55
|
+
* Announcement category
|
|
7
56
|
*/
|
|
8
|
-
export type
|
|
57
|
+
export type AnnouncementCategory = 'notice' | 'trade' | 'wallet' | 'maintenance' | 'digital_asset' | 'nft' | 'service' | 'event' | 'note' | 'trading' | 'airdrop' | 'feature' | 'disclosure';
|
|
58
|
+
export type AnnouncementEventType = 'CREATED' | 'UPDATED';
|
|
59
|
+
export interface SimpleAnnouncement {
|
|
60
|
+
/**
|
|
61
|
+
* Data type
|
|
62
|
+
*/
|
|
63
|
+
ty: 'announcement';
|
|
64
|
+
/**
|
|
65
|
+
* Announcement body in Markdown. Included only when include_body is true and may
|
|
66
|
+
* be null for large bodies.
|
|
67
|
+
*/
|
|
68
|
+
bd?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Announcement category
|
|
71
|
+
*/
|
|
72
|
+
cat?: 'notice' | 'trade' | 'wallet' | 'maintenance' | 'digital_asset' | 'nft' | 'service' | 'event' | 'note' | 'trading' | 'airdrop' | 'feature' | 'disclosure';
|
|
73
|
+
/**
|
|
74
|
+
* Announcement event type
|
|
75
|
+
*/
|
|
76
|
+
et?: 'CREATED' | 'UPDATED';
|
|
77
|
+
/**
|
|
78
|
+
* First publication time (KST, ISO 8601)
|
|
79
|
+
*/
|
|
80
|
+
flat?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Latest publication time (KST, ISO 8601)
|
|
83
|
+
*/
|
|
84
|
+
lat?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Stream type (announcement supports realtime only)
|
|
87
|
+
*/
|
|
88
|
+
st?: 'REALTIME';
|
|
89
|
+
/**
|
|
90
|
+
* Timestamp (ms)
|
|
91
|
+
*/
|
|
92
|
+
tms?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Announcement title
|
|
95
|
+
*/
|
|
96
|
+
tt?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Announcement unique ID
|
|
99
|
+
*/
|
|
100
|
+
uid?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Announcement detail page URL
|
|
103
|
+
*/
|
|
104
|
+
url?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface SimpleMyAsset {
|
|
107
|
+
/**
|
|
108
|
+
* Data type
|
|
109
|
+
*/
|
|
110
|
+
ty: 'myAsset';
|
|
111
|
+
/**
|
|
112
|
+
* List of asset entries
|
|
113
|
+
*/
|
|
114
|
+
ast?: Array<SimpleMyAsset.Ast>;
|
|
115
|
+
/**
|
|
116
|
+
* Asset timestamp (ms)
|
|
117
|
+
*/
|
|
118
|
+
asttms?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Asset unique ID
|
|
121
|
+
*/
|
|
122
|
+
astuid?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Stream type (snapshot or realtime)
|
|
125
|
+
*/
|
|
126
|
+
st?: 'SNAPSHOT' | 'REALTIME';
|
|
127
|
+
/**
|
|
128
|
+
* Timestamp (ms)
|
|
129
|
+
*/
|
|
130
|
+
tms?: number;
|
|
131
|
+
}
|
|
132
|
+
export declare namespace SimpleMyAsset {
|
|
133
|
+
/**
|
|
134
|
+
* Asset entry
|
|
135
|
+
*/
|
|
136
|
+
interface Ast {
|
|
137
|
+
/**
|
|
138
|
+
* Available balance
|
|
139
|
+
*/
|
|
140
|
+
b?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Currency code (uppercase)
|
|
143
|
+
*/
|
|
144
|
+
cu?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Balance locked in open orders
|
|
147
|
+
*/
|
|
148
|
+
l?: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export interface SimpleMyOrder {
|
|
152
|
+
/**
|
|
153
|
+
* Data type
|
|
154
|
+
*/
|
|
155
|
+
ty: 'myOrder';
|
|
156
|
+
/**
|
|
157
|
+
* User-defined lookup value. Only provided for orders created after 2024-10-18.
|
|
158
|
+
*/
|
|
159
|
+
id?: string | null;
|
|
160
|
+
/**
|
|
161
|
+
* Ask/bid side
|
|
162
|
+
*/
|
|
163
|
+
ab?: 'ASK' | 'BID';
|
|
164
|
+
/**
|
|
165
|
+
* Average execution price
|
|
166
|
+
*/
|
|
167
|
+
ap?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Market code
|
|
170
|
+
*/
|
|
171
|
+
cd?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Executed trade value
|
|
174
|
+
*/
|
|
175
|
+
ef?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Executed quantity
|
|
178
|
+
*/
|
|
179
|
+
ev?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Whether the executed order is a maker order. Null when state is not trade.
|
|
182
|
+
*/
|
|
183
|
+
im?: boolean | null;
|
|
184
|
+
/**
|
|
185
|
+
* Amount locked for this trade
|
|
186
|
+
*/
|
|
187
|
+
l?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Order type
|
|
190
|
+
*/
|
|
191
|
+
ot?: 'limit' | 'price' | 'market' | 'best';
|
|
192
|
+
/**
|
|
193
|
+
* Order timestamp (ms)
|
|
194
|
+
*/
|
|
195
|
+
otms?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Order price. When state=trade, this is the execution price.
|
|
198
|
+
*/
|
|
199
|
+
p?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Fee already paid
|
|
202
|
+
*/
|
|
203
|
+
pf?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Amount (buy) or quantity (sell) cancelled by self-match prevention
|
|
206
|
+
*/
|
|
207
|
+
pl?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Order quantity cancelled by self-match prevention
|
|
210
|
+
*/
|
|
211
|
+
pv?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Remaining fee
|
|
214
|
+
*/
|
|
215
|
+
rmf?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Fee reserved for this order
|
|
218
|
+
*/
|
|
219
|
+
rsf?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Remaining order quantity after execution
|
|
222
|
+
*/
|
|
223
|
+
rv?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Order status
|
|
226
|
+
*/
|
|
227
|
+
s?: 'wait' | 'watch' | 'trade' | 'done' | 'cancel' | 'prevented';
|
|
228
|
+
/**
|
|
229
|
+
* Self-match prevention type
|
|
230
|
+
*/
|
|
231
|
+
smpt?: 'reduce' | 'cancel_maker' | 'cancel_taker' | null;
|
|
232
|
+
/**
|
|
233
|
+
* Stream type (snapshot or realtime)
|
|
234
|
+
*/
|
|
235
|
+
st?: 'SNAPSHOT' | 'REALTIME';
|
|
236
|
+
/**
|
|
237
|
+
* Number of executions for this order
|
|
238
|
+
*/
|
|
239
|
+
tc?: number;
|
|
240
|
+
/**
|
|
241
|
+
* Fee incurred on execution. Null when state is not trade.
|
|
242
|
+
*/
|
|
243
|
+
tf?: string | null;
|
|
244
|
+
/**
|
|
245
|
+
* IOC/FOK/POST ONLY order condition
|
|
246
|
+
*/
|
|
247
|
+
tif?: 'ioc' | 'fok' | 'post_only' | null;
|
|
248
|
+
/**
|
|
249
|
+
* Timestamp (ms)
|
|
250
|
+
*/
|
|
251
|
+
tms?: number;
|
|
252
|
+
/**
|
|
253
|
+
* Trade timestamp (ms)
|
|
254
|
+
*/
|
|
255
|
+
ttms?: number | null;
|
|
256
|
+
/**
|
|
257
|
+
* Trade unique ID
|
|
258
|
+
*/
|
|
259
|
+
tuid?: string | null;
|
|
260
|
+
/**
|
|
261
|
+
* Order unique ID
|
|
262
|
+
*/
|
|
263
|
+
uid?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Order quantity. When state=trade, this is the executed quantity.
|
|
266
|
+
*/
|
|
267
|
+
v?: string;
|
|
268
|
+
}
|
|
269
|
+
export type SimplePrivateServerEvent = SimpleAnnouncement | SimpleMyOrder | SimpleMyAsset;
|
|
270
|
+
export type ConnectPrivateClientEvent = Array<ConnectPrivateClientEvent.WsTicketField | ConnectPrivateClientEvent.WsAnnouncementTypeField | ConnectPrivateClientEvent.WsMyOrderTypeField | ConnectPrivateClientEvent.WsMyAssetTypeField | ConnectPrivateClientEvent.WsFormatField>;
|
|
9
271
|
export declare namespace ConnectPrivateClientEvent {
|
|
272
|
+
/**
|
|
273
|
+
* Ticket field that identifies the requester
|
|
274
|
+
*/
|
|
275
|
+
interface WsTicketField {
|
|
276
|
+
/**
|
|
277
|
+
* A value that uniquely identifies the requester (UUID recommended)
|
|
278
|
+
*/
|
|
279
|
+
ticket: string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Announcement subscription type field
|
|
283
|
+
*/
|
|
284
|
+
interface WsAnnouncementTypeField {
|
|
285
|
+
type: 'announcement';
|
|
286
|
+
/**
|
|
287
|
+
* Announcement categories to receive. Omit this field to receive announcements
|
|
288
|
+
* from all categories.
|
|
289
|
+
*/
|
|
290
|
+
categories?: Array<WsPrivateAPI.AnnouncementCategory>;
|
|
291
|
+
/**
|
|
292
|
+
* Whether to include the announcement body in stream messages
|
|
293
|
+
*/
|
|
294
|
+
include_body?: boolean;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Response format specifier field
|
|
298
|
+
*/
|
|
299
|
+
interface WsFormatField {
|
|
300
|
+
/**
|
|
301
|
+
* Response format selector
|
|
302
|
+
*/
|
|
303
|
+
format?: 'DEFAULT' | 'SIMPLE' | 'JSON_LIST' | 'SIMPLE_LIST';
|
|
304
|
+
}
|
|
10
305
|
/**
|
|
11
306
|
* Ticket field that identifies the requester
|
|
12
307
|
*/
|
|
@@ -42,11 +337,7 @@ export declare namespace ConnectPrivateClientEvent {
|
|
|
42
337
|
type: 'myAsset';
|
|
43
338
|
}
|
|
44
339
|
}
|
|
45
|
-
|
|
46
|
-
* WebSocket private server event — stream message received from server (JWT
|
|
47
|
-
* required)
|
|
48
|
-
*/
|
|
49
|
-
export type ConnectPrivateServerEvent = ConnectPrivateServerEvent.MyOrder | ConnectPrivateServerEvent.MyAsset;
|
|
340
|
+
export type ConnectPrivateServerEvent = Announcement | ConnectPrivateServerEvent.MyOrder | ConnectPrivateServerEvent.MyAsset;
|
|
50
341
|
export declare namespace ConnectPrivateServerEvent {
|
|
51
342
|
/**
|
|
52
343
|
* My order (MyOrder) stream message payload
|
|
@@ -219,6 +510,7 @@ export declare namespace ConnectPrivateServerEvent {
|
|
|
219
510
|
}
|
|
220
511
|
}
|
|
221
512
|
export declare namespace WsPrivate {
|
|
222
|
-
export { type ConnectPrivateClientEvent as ConnectPrivateClientEvent, type ConnectPrivateServerEvent as ConnectPrivateServerEvent, };
|
|
513
|
+
export { type Announcement as Announcement, type AnnouncementCategory as AnnouncementCategory, type AnnouncementEventType as AnnouncementEventType, type SimpleAnnouncement as SimpleAnnouncement, type SimpleMyAsset as SimpleMyAsset, type SimpleMyOrder as SimpleMyOrder, type SimplePrivateServerEvent as SimplePrivateServerEvent, type ConnectPrivateClientEvent as ConnectPrivateClientEvent, type ConnectPrivateServerMessage as ConnectPrivateServerMessage, type ConnectPrivateServerEvent as ConnectPrivateServerEvent, };
|
|
223
514
|
}
|
|
515
|
+
export type ConnectPrivateServerMessage = WebSocketMessage<ConnectPrivateServerEvent | SimplePrivateServerEvent> | WsListSubscriptionsResponse | Array<WebSocketMessage<ConnectPrivateServerEvent | SimplePrivateServerEvent> | WsListSubscriptionsResponse>;
|
|
224
516
|
//# sourceMappingURL=ws-private.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-private.d.mts","sourceRoot":"","sources":["../../src/resources/ws-private/ws-private.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ws-private.d.mts","sourceRoot":"","sources":["../../src/resources/ws-private/ws-private.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,gBAAgB,EAAE;OAEzB,KAAK,EAAE,2BAA2B,EAAE;OAEpC,EAAE,WAAW,EAAE;OAEf,KAAK,YAAY;AAExB,qBAAa,SAAU,SAAQ,WAAW;CAAG;AAE7C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IAEnC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,o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1,12 +1,307 @@
|
|
|
1
|
+
import type { WebSocketMessage } from "../../internal/ws-parser.js";
|
|
2
|
+
import type { WsListSubscriptionsResponse } from "../../lib/ws.js";
|
|
1
3
|
import { APIResource } from "../../core/resource.js";
|
|
4
|
+
import * as WsPrivateAPI from "./ws-private.js";
|
|
2
5
|
export declare class WsPrivate extends APIResource {
|
|
3
6
|
}
|
|
7
|
+
export interface Announcement {
|
|
8
|
+
/**
|
|
9
|
+
* Data type
|
|
10
|
+
*/
|
|
11
|
+
type: 'announcement';
|
|
12
|
+
/**
|
|
13
|
+
* Announcement body in Markdown. Included only when include_body is true and may
|
|
14
|
+
* be null for large bodies.
|
|
15
|
+
*/
|
|
16
|
+
body?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Announcement category
|
|
19
|
+
*/
|
|
20
|
+
category?: AnnouncementCategory;
|
|
21
|
+
/**
|
|
22
|
+
* Announcement event type
|
|
23
|
+
*/
|
|
24
|
+
event_type?: AnnouncementEventType;
|
|
25
|
+
/**
|
|
26
|
+
* First publication time (KST, ISO 8601)
|
|
27
|
+
*/
|
|
28
|
+
first_listed_at?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Latest publication time (KST, ISO 8601)
|
|
31
|
+
*/
|
|
32
|
+
listed_at?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Stream type (announcement supports realtime only)
|
|
35
|
+
*/
|
|
36
|
+
stream_type?: 'REALTIME';
|
|
37
|
+
/**
|
|
38
|
+
* Timestamp (ms)
|
|
39
|
+
*/
|
|
40
|
+
timestamp?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Announcement title
|
|
43
|
+
*/
|
|
44
|
+
title?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Announcement detail page URL
|
|
47
|
+
*/
|
|
48
|
+
url?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Announcement unique ID
|
|
51
|
+
*/
|
|
52
|
+
uuid?: string;
|
|
53
|
+
}
|
|
4
54
|
/**
|
|
5
|
-
*
|
|
6
|
-
* required)
|
|
55
|
+
* Announcement category
|
|
7
56
|
*/
|
|
8
|
-
export type
|
|
57
|
+
export type AnnouncementCategory = 'notice' | 'trade' | 'wallet' | 'maintenance' | 'digital_asset' | 'nft' | 'service' | 'event' | 'note' | 'trading' | 'airdrop' | 'feature' | 'disclosure';
|
|
58
|
+
export type AnnouncementEventType = 'CREATED' | 'UPDATED';
|
|
59
|
+
export interface SimpleAnnouncement {
|
|
60
|
+
/**
|
|
61
|
+
* Data type
|
|
62
|
+
*/
|
|
63
|
+
ty: 'announcement';
|
|
64
|
+
/**
|
|
65
|
+
* Announcement body in Markdown. Included only when include_body is true and may
|
|
66
|
+
* be null for large bodies.
|
|
67
|
+
*/
|
|
68
|
+
bd?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
* Announcement category
|
|
71
|
+
*/
|
|
72
|
+
cat?: 'notice' | 'trade' | 'wallet' | 'maintenance' | 'digital_asset' | 'nft' | 'service' | 'event' | 'note' | 'trading' | 'airdrop' | 'feature' | 'disclosure';
|
|
73
|
+
/**
|
|
74
|
+
* Announcement event type
|
|
75
|
+
*/
|
|
76
|
+
et?: 'CREATED' | 'UPDATED';
|
|
77
|
+
/**
|
|
78
|
+
* First publication time (KST, ISO 8601)
|
|
79
|
+
*/
|
|
80
|
+
flat?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Latest publication time (KST, ISO 8601)
|
|
83
|
+
*/
|
|
84
|
+
lat?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Stream type (announcement supports realtime only)
|
|
87
|
+
*/
|
|
88
|
+
st?: 'REALTIME';
|
|
89
|
+
/**
|
|
90
|
+
* Timestamp (ms)
|
|
91
|
+
*/
|
|
92
|
+
tms?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Announcement title
|
|
95
|
+
*/
|
|
96
|
+
tt?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Announcement unique ID
|
|
99
|
+
*/
|
|
100
|
+
uid?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Announcement detail page URL
|
|
103
|
+
*/
|
|
104
|
+
url?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface SimpleMyAsset {
|
|
107
|
+
/**
|
|
108
|
+
* Data type
|
|
109
|
+
*/
|
|
110
|
+
ty: 'myAsset';
|
|
111
|
+
/**
|
|
112
|
+
* List of asset entries
|
|
113
|
+
*/
|
|
114
|
+
ast?: Array<SimpleMyAsset.Ast>;
|
|
115
|
+
/**
|
|
116
|
+
* Asset timestamp (ms)
|
|
117
|
+
*/
|
|
118
|
+
asttms?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Asset unique ID
|
|
121
|
+
*/
|
|
122
|
+
astuid?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Stream type (snapshot or realtime)
|
|
125
|
+
*/
|
|
126
|
+
st?: 'SNAPSHOT' | 'REALTIME';
|
|
127
|
+
/**
|
|
128
|
+
* Timestamp (ms)
|
|
129
|
+
*/
|
|
130
|
+
tms?: number;
|
|
131
|
+
}
|
|
132
|
+
export declare namespace SimpleMyAsset {
|
|
133
|
+
/**
|
|
134
|
+
* Asset entry
|
|
135
|
+
*/
|
|
136
|
+
interface Ast {
|
|
137
|
+
/**
|
|
138
|
+
* Available balance
|
|
139
|
+
*/
|
|
140
|
+
b?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Currency code (uppercase)
|
|
143
|
+
*/
|
|
144
|
+
cu?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Balance locked in open orders
|
|
147
|
+
*/
|
|
148
|
+
l?: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export interface SimpleMyOrder {
|
|
152
|
+
/**
|
|
153
|
+
* Data type
|
|
154
|
+
*/
|
|
155
|
+
ty: 'myOrder';
|
|
156
|
+
/**
|
|
157
|
+
* User-defined lookup value. Only provided for orders created after 2024-10-18.
|
|
158
|
+
*/
|
|
159
|
+
id?: string | null;
|
|
160
|
+
/**
|
|
161
|
+
* Ask/bid side
|
|
162
|
+
*/
|
|
163
|
+
ab?: 'ASK' | 'BID';
|
|
164
|
+
/**
|
|
165
|
+
* Average execution price
|
|
166
|
+
*/
|
|
167
|
+
ap?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Market code
|
|
170
|
+
*/
|
|
171
|
+
cd?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Executed trade value
|
|
174
|
+
*/
|
|
175
|
+
ef?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Executed quantity
|
|
178
|
+
*/
|
|
179
|
+
ev?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Whether the executed order is a maker order. Null when state is not trade.
|
|
182
|
+
*/
|
|
183
|
+
im?: boolean | null;
|
|
184
|
+
/**
|
|
185
|
+
* Amount locked for this trade
|
|
186
|
+
*/
|
|
187
|
+
l?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Order type
|
|
190
|
+
*/
|
|
191
|
+
ot?: 'limit' | 'price' | 'market' | 'best';
|
|
192
|
+
/**
|
|
193
|
+
* Order timestamp (ms)
|
|
194
|
+
*/
|
|
195
|
+
otms?: number;
|
|
196
|
+
/**
|
|
197
|
+
* Order price. When state=trade, this is the execution price.
|
|
198
|
+
*/
|
|
199
|
+
p?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Fee already paid
|
|
202
|
+
*/
|
|
203
|
+
pf?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Amount (buy) or quantity (sell) cancelled by self-match prevention
|
|
206
|
+
*/
|
|
207
|
+
pl?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Order quantity cancelled by self-match prevention
|
|
210
|
+
*/
|
|
211
|
+
pv?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Remaining fee
|
|
214
|
+
*/
|
|
215
|
+
rmf?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Fee reserved for this order
|
|
218
|
+
*/
|
|
219
|
+
rsf?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Remaining order quantity after execution
|
|
222
|
+
*/
|
|
223
|
+
rv?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Order status
|
|
226
|
+
*/
|
|
227
|
+
s?: 'wait' | 'watch' | 'trade' | 'done' | 'cancel' | 'prevented';
|
|
228
|
+
/**
|
|
229
|
+
* Self-match prevention type
|
|
230
|
+
*/
|
|
231
|
+
smpt?: 'reduce' | 'cancel_maker' | 'cancel_taker' | null;
|
|
232
|
+
/**
|
|
233
|
+
* Stream type (snapshot or realtime)
|
|
234
|
+
*/
|
|
235
|
+
st?: 'SNAPSHOT' | 'REALTIME';
|
|
236
|
+
/**
|
|
237
|
+
* Number of executions for this order
|
|
238
|
+
*/
|
|
239
|
+
tc?: number;
|
|
240
|
+
/**
|
|
241
|
+
* Fee incurred on execution. Null when state is not trade.
|
|
242
|
+
*/
|
|
243
|
+
tf?: string | null;
|
|
244
|
+
/**
|
|
245
|
+
* IOC/FOK/POST ONLY order condition
|
|
246
|
+
*/
|
|
247
|
+
tif?: 'ioc' | 'fok' | 'post_only' | null;
|
|
248
|
+
/**
|
|
249
|
+
* Timestamp (ms)
|
|
250
|
+
*/
|
|
251
|
+
tms?: number;
|
|
252
|
+
/**
|
|
253
|
+
* Trade timestamp (ms)
|
|
254
|
+
*/
|
|
255
|
+
ttms?: number | null;
|
|
256
|
+
/**
|
|
257
|
+
* Trade unique ID
|
|
258
|
+
*/
|
|
259
|
+
tuid?: string | null;
|
|
260
|
+
/**
|
|
261
|
+
* Order unique ID
|
|
262
|
+
*/
|
|
263
|
+
uid?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Order quantity. When state=trade, this is the executed quantity.
|
|
266
|
+
*/
|
|
267
|
+
v?: string;
|
|
268
|
+
}
|
|
269
|
+
export type SimplePrivateServerEvent = SimpleAnnouncement | SimpleMyOrder | SimpleMyAsset;
|
|
270
|
+
export type ConnectPrivateClientEvent = Array<ConnectPrivateClientEvent.WsTicketField | ConnectPrivateClientEvent.WsAnnouncementTypeField | ConnectPrivateClientEvent.WsMyOrderTypeField | ConnectPrivateClientEvent.WsMyAssetTypeField | ConnectPrivateClientEvent.WsFormatField>;
|
|
9
271
|
export declare namespace ConnectPrivateClientEvent {
|
|
272
|
+
/**
|
|
273
|
+
* Ticket field that identifies the requester
|
|
274
|
+
*/
|
|
275
|
+
interface WsTicketField {
|
|
276
|
+
/**
|
|
277
|
+
* A value that uniquely identifies the requester (UUID recommended)
|
|
278
|
+
*/
|
|
279
|
+
ticket: string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Announcement subscription type field
|
|
283
|
+
*/
|
|
284
|
+
interface WsAnnouncementTypeField {
|
|
285
|
+
type: 'announcement';
|
|
286
|
+
/**
|
|
287
|
+
* Announcement categories to receive. Omit this field to receive announcements
|
|
288
|
+
* from all categories.
|
|
289
|
+
*/
|
|
290
|
+
categories?: Array<WsPrivateAPI.AnnouncementCategory>;
|
|
291
|
+
/**
|
|
292
|
+
* Whether to include the announcement body in stream messages
|
|
293
|
+
*/
|
|
294
|
+
include_body?: boolean;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Response format specifier field
|
|
298
|
+
*/
|
|
299
|
+
interface WsFormatField {
|
|
300
|
+
/**
|
|
301
|
+
* Response format selector
|
|
302
|
+
*/
|
|
303
|
+
format?: 'DEFAULT' | 'SIMPLE' | 'JSON_LIST' | 'SIMPLE_LIST';
|
|
304
|
+
}
|
|
10
305
|
/**
|
|
11
306
|
* Ticket field that identifies the requester
|
|
12
307
|
*/
|
|
@@ -42,11 +337,7 @@ export declare namespace ConnectPrivateClientEvent {
|
|
|
42
337
|
type: 'myAsset';
|
|
43
338
|
}
|
|
44
339
|
}
|
|
45
|
-
|
|
46
|
-
* WebSocket private server event — stream message received from server (JWT
|
|
47
|
-
* required)
|
|
48
|
-
*/
|
|
49
|
-
export type ConnectPrivateServerEvent = ConnectPrivateServerEvent.MyOrder | ConnectPrivateServerEvent.MyAsset;
|
|
340
|
+
export type ConnectPrivateServerEvent = Announcement | ConnectPrivateServerEvent.MyOrder | ConnectPrivateServerEvent.MyAsset;
|
|
50
341
|
export declare namespace ConnectPrivateServerEvent {
|
|
51
342
|
/**
|
|
52
343
|
* My order (MyOrder) stream message payload
|
|
@@ -219,6 +510,7 @@ export declare namespace ConnectPrivateServerEvent {
|
|
|
219
510
|
}
|
|
220
511
|
}
|
|
221
512
|
export declare namespace WsPrivate {
|
|
222
|
-
export { type ConnectPrivateClientEvent as ConnectPrivateClientEvent, type ConnectPrivateServerEvent as ConnectPrivateServerEvent, };
|
|
513
|
+
export { type Announcement as Announcement, type AnnouncementCategory as AnnouncementCategory, type AnnouncementEventType as AnnouncementEventType, type SimpleAnnouncement as SimpleAnnouncement, type SimpleMyAsset as SimpleMyAsset, type SimpleMyOrder as SimpleMyOrder, type SimplePrivateServerEvent as SimplePrivateServerEvent, type ConnectPrivateClientEvent as ConnectPrivateClientEvent, type ConnectPrivateServerMessage as ConnectPrivateServerMessage, type ConnectPrivateServerEvent as ConnectPrivateServerEvent, };
|
|
223
514
|
}
|
|
515
|
+
export type ConnectPrivateServerMessage = WebSocketMessage<ConnectPrivateServerEvent | SimplePrivateServerEvent> | WsListSubscriptionsResponse | Array<WebSocketMessage<ConnectPrivateServerEvent | SimplePrivateServerEvent> | WsListSubscriptionsResponse>;
|
|
224
516
|
//# sourceMappingURL=ws-private.d.ts.map
|