@clear-street/clearstreet 0.0.0 → 0.72.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 +986 -0
- package/LICENSE +201 -0
- package/README.md +358 -0
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -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 +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +195 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +195 -0
- package/client.d.ts.map +1 -0
- package/client.js +489 -0
- package/client.js.map +1 -0
- package/client.mjs +485 -0
- package/client.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 +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.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 +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -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 +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +3 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +3 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -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 +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.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 +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -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 +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -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 +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -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 +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -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 +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -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 +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -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 +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -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 +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -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 +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -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 +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -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 +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -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 +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -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 +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -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 +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +147 -3
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +3 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +3 -0
- package/resource.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +9 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.mts +63 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +63 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/v1/accounts.d.mts +433 -0
- package/resources/v1/accounts.d.mts.map +1 -0
- package/resources/v1/accounts.d.ts +433 -0
- package/resources/v1/accounts.d.ts.map +1 -0
- package/resources/v1/accounts.js +74 -0
- package/resources/v1/accounts.js.map +1 -0
- package/resources/v1/accounts.mjs +70 -0
- package/resources/v1/accounts.mjs.map +1 -0
- package/resources/v1/api-version.d.mts +37 -0
- package/resources/v1/api-version.d.mts.map +1 -0
- package/resources/v1/api-version.d.ts +37 -0
- package/resources/v1/api-version.d.ts.map +1 -0
- package/resources/v1/api-version.js +23 -0
- package/resources/v1/api-version.js.map +1 -0
- package/resources/v1/api-version.mjs +19 -0
- package/resources/v1/api-version.mjs.map +1 -0
- package/resources/v1/calendar.d.mts +170 -0
- package/resources/v1/calendar.d.mts.map +1 -0
- package/resources/v1/calendar.d.ts +170 -0
- package/resources/v1/calendar.d.ts.map +1 -0
- package/resources/v1/calendar.js +39 -0
- package/resources/v1/calendar.js.map +1 -0
- package/resources/v1/calendar.mjs +35 -0
- package/resources/v1/calendar.mjs.map +1 -0
- package/resources/v1/index.d.mts +12 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +12 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +27 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +13 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/v1/instrument-data/index.d.mts +4 -0
- package/resources/v1/instrument-data/index.d.mts.map +1 -0
- package/resources/v1/instrument-data/index.d.ts +4 -0
- package/resources/v1/instrument-data/index.d.ts.map +1 -0
- package/resources/v1/instrument-data/index.js +11 -0
- package/resources/v1/instrument-data/index.js.map +1 -0
- package/resources/v1/instrument-data/index.mjs +5 -0
- package/resources/v1/instrument-data/index.mjs.map +1 -0
- package/resources/v1/instrument-data/instrument-data.d.mts +1202 -0
- package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -0
- package/resources/v1/instrument-data/instrument-data.d.ts +1202 -0
- package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -0
- package/resources/v1/instrument-data/instrument-data.js +150 -0
- package/resources/v1/instrument-data/instrument-data.js.map +1 -0
- package/resources/v1/instrument-data/instrument-data.mjs +145 -0
- package/resources/v1/instrument-data/instrument-data.mjs.map +1 -0
- package/resources/v1/instrument-data/market-data.d.mts +240 -0
- package/resources/v1/instrument-data/market-data.d.mts.map +1 -0
- package/resources/v1/instrument-data/market-data.d.ts +240 -0
- package/resources/v1/instrument-data/market-data.d.ts.map +1 -0
- package/resources/v1/instrument-data/market-data.js +49 -0
- package/resources/v1/instrument-data/market-data.js.map +1 -0
- package/resources/v1/instrument-data/market-data.mjs +45 -0
- package/resources/v1/instrument-data/market-data.mjs.map +1 -0
- package/resources/v1/instrument-data/news.d.mts +136 -0
- package/resources/v1/instrument-data/news.d.mts.map +1 -0
- package/resources/v1/instrument-data/news.d.ts +136 -0
- package/resources/v1/instrument-data/news.d.ts.map +1 -0
- package/resources/v1/instrument-data/news.js +25 -0
- package/resources/v1/instrument-data/news.js.map +1 -0
- package/resources/v1/instrument-data/news.mjs +21 -0
- package/resources/v1/instrument-data/news.mjs.map +1 -0
- package/resources/v1/instrument-data.d.mts +2 -0
- package/resources/v1/instrument-data.d.mts.map +1 -0
- package/resources/v1/instrument-data.d.ts +2 -0
- package/resources/v1/instrument-data.d.ts.map +1 -0
- package/resources/v1/instrument-data.js +6 -0
- package/resources/v1/instrument-data.js.map +1 -0
- package/resources/v1/instrument-data.mjs +3 -0
- package/resources/v1/instrument-data.mjs.map +1 -0
- package/resources/v1/instruments.d.mts +471 -0
- package/resources/v1/instruments.d.mts.map +1 -0
- package/resources/v1/instruments.d.ts +471 -0
- package/resources/v1/instruments.d.ts.map +1 -0
- package/resources/v1/instruments.js +75 -0
- package/resources/v1/instruments.js.map +1 -0
- package/resources/v1/instruments.mjs +71 -0
- package/resources/v1/instruments.mjs.map +1 -0
- package/resources/v1/omni-ai/entitlements.d.mts +108 -0
- package/resources/v1/omni-ai/entitlements.d.mts.map +1 -0
- package/resources/v1/omni-ai/entitlements.d.ts +108 -0
- package/resources/v1/omni-ai/entitlements.d.ts.map +1 -0
- package/resources/v1/omni-ai/entitlements.js +67 -0
- package/resources/v1/omni-ai/entitlements.js.map +1 -0
- package/resources/v1/omni-ai/entitlements.mjs +63 -0
- package/resources/v1/omni-ai/entitlements.mjs.map +1 -0
- package/resources/v1/omni-ai/index.d.mts +6 -0
- package/resources/v1/omni-ai/index.d.mts.map +1 -0
- package/resources/v1/omni-ai/index.d.ts +6 -0
- package/resources/v1/omni-ai/index.d.ts.map +1 -0
- package/resources/v1/omni-ai/index.js +15 -0
- package/resources/v1/omni-ai/index.js.map +1 -0
- package/resources/v1/omni-ai/index.mjs +7 -0
- package/resources/v1/omni-ai/index.mjs.map +1 -0
- package/resources/v1/omni-ai/messages.d.mts +85 -0
- package/resources/v1/omni-ai/messages.d.mts.map +1 -0
- package/resources/v1/omni-ai/messages.d.ts +85 -0
- package/resources/v1/omni-ai/messages.d.ts.map +1 -0
- package/resources/v1/omni-ai/messages.js +51 -0
- package/resources/v1/omni-ai/messages.js.map +1 -0
- package/resources/v1/omni-ai/messages.mjs +47 -0
- package/resources/v1/omni-ai/messages.mjs.map +1 -0
- package/resources/v1/omni-ai/omni-ai.d.mts +323 -0
- package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -0
- package/resources/v1/omni-ai/omni-ai.d.ts +323 -0
- package/resources/v1/omni-ai/omni-ai.d.ts.map +1 -0
- package/resources/v1/omni-ai/omni-ai.js +29 -0
- package/resources/v1/omni-ai/omni-ai.js.map +1 -0
- package/resources/v1/omni-ai/omni-ai.mjs +24 -0
- package/resources/v1/omni-ai/omni-ai.mjs.map +1 -0
- package/resources/v1/omni-ai/responses.d.mts +158 -0
- package/resources/v1/omni-ai/responses.d.mts.map +1 -0
- package/resources/v1/omni-ai/responses.d.ts +158 -0
- package/resources/v1/omni-ai/responses.d.ts.map +1 -0
- package/resources/v1/omni-ai/responses.js +60 -0
- package/resources/v1/omni-ai/responses.js.map +1 -0
- package/resources/v1/omni-ai/responses.mjs +56 -0
- package/resources/v1/omni-ai/responses.mjs.map +1 -0
- package/resources/v1/omni-ai/threads.d.mts +338 -0
- package/resources/v1/omni-ai/threads.d.mts.map +1 -0
- package/resources/v1/omni-ai/threads.d.ts +338 -0
- package/resources/v1/omni-ai/threads.d.ts.map +1 -0
- package/resources/v1/omni-ai/threads.js +141 -0
- package/resources/v1/omni-ai/threads.js.map +1 -0
- package/resources/v1/omni-ai/threads.mjs +137 -0
- package/resources/v1/omni-ai/threads.mjs.map +1 -0
- package/resources/v1/omni-ai.d.mts +2 -0
- package/resources/v1/omni-ai.d.mts.map +1 -0
- package/resources/v1/omni-ai.d.ts +2 -0
- package/resources/v1/omni-ai.d.ts.map +1 -0
- package/resources/v1/omni-ai.js +6 -0
- package/resources/v1/omni-ai.js.map +1 -0
- package/resources/v1/omni-ai.mjs +3 -0
- package/resources/v1/omni-ai.mjs.map +1 -0
- package/resources/v1/orders.d.mts +643 -0
- package/resources/v1/orders.d.mts.map +1 -0
- package/resources/v1/orders.d.ts +643 -0
- package/resources/v1/orders.d.ts.map +1 -0
- package/resources/v1/orders.js +134 -0
- package/resources/v1/orders.js.map +1 -0
- package/resources/v1/orders.mjs +130 -0
- package/resources/v1/orders.mjs.map +1 -0
- package/resources/v1/positions.d.mts +385 -0
- package/resources/v1/positions.d.mts.map +1 -0
- package/resources/v1/positions.d.ts +385 -0
- package/resources/v1/positions.d.ts.map +1 -0
- package/resources/v1/positions.js +130 -0
- package/resources/v1/positions.js.map +1 -0
- package/resources/v1/positions.mjs +126 -0
- package/resources/v1/positions.mjs.map +1 -0
- package/resources/v1/v1.d.mts +51 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +51 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +53 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +48 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1/watchlist.d.mts +210 -0
- package/resources/v1/watchlist.d.mts.map +1 -0
- package/resources/v1/watchlist.d.ts +210 -0
- package/resources/v1/watchlist.d.ts.map +1 -0
- package/resources/v1/watchlist.js +95 -0
- package/resources/v1/watchlist.js.map +1 -0
- package/resources/v1/watchlist.mjs +91 -0
- package/resources/v1/watchlist.mjs.map +1 -0
- package/resources/v1/websocket.d.mts +18 -0
- package/resources/v1/websocket.d.mts.map +1 -0
- package/resources/v1/websocket.d.ts +18 -0
- package/resources/v1/websocket.d.ts.map +1 -0
- package/resources/v1/websocket.js +27 -0
- package/resources/v1/websocket.js.map +1 -0
- package/resources/v1/websocket.mjs +23 -0
- package/resources/v1/websocket.mjs.map +1 -0
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +6 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.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 +769 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -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 +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +93 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/index.ts +4 -0
- package/src/resources/shared.ts +72 -0
- package/src/resources/v1/accounts.ts +583 -0
- package/src/resources/v1/api-version.ts +44 -0
- package/src/resources/v1/calendar.ts +221 -0
- package/src/resources/v1/index.ts +203 -0
- package/src/resources/v1/instrument-data/index.ts +63 -0
- package/src/resources/v1/instrument-data/instrument-data.ts +1584 -0
- package/src/resources/v1/instrument-data/market-data.ts +306 -0
- package/src/resources/v1/instrument-data/news.ts +188 -0
- package/src/resources/v1/instrument-data.ts +3 -0
- package/src/resources/v1/instruments.ts +609 -0
- package/src/resources/v1/omni-ai/entitlements.ts +170 -0
- package/src/resources/v1/omni-ai/index.ts +89 -0
- package/src/resources/v1/omni-ai/messages.ts +117 -0
- package/src/resources/v1/omni-ai/omni-ai.ts +527 -0
- package/src/resources/v1/omni-ai/responses.ts +220 -0
- package/src/resources/v1/omni-ai/threads.ts +460 -0
- package/src/resources/v1/omni-ai.ts +3 -0
- package/src/resources/v1/orders.ts +912 -0
- package/src/resources/v1/positions.ts +533 -0
- package/src/resources/v1/v1.ts +460 -0
- package/src/resources/v1/watchlist.ts +292 -0
- package/src/resources/v1/websocket.ts +26 -0
- package/src/resources/v1.ts +3 -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 +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +3 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +3 -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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A direct mapping of tonic::Status, for use in HTTP responses.
|
|
3
|
+
*/
|
|
4
|
+
export interface APIError {
|
|
5
|
+
/**
|
|
6
|
+
* The error code is used to identify the nature of the error. It corresponds to an
|
|
7
|
+
* HTTP status code.
|
|
8
|
+
*/
|
|
9
|
+
code: number;
|
|
10
|
+
/**
|
|
11
|
+
* A human-readable message providing more details about the error.
|
|
12
|
+
*/
|
|
13
|
+
message: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional error details, if any. This can include structured information such
|
|
16
|
+
* as field violations or error metadata.
|
|
17
|
+
*/
|
|
18
|
+
details?: Array<{
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
export interface BaseResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Response metadata, including the request ID and optional pagination info.
|
|
25
|
+
*/
|
|
26
|
+
metadata: ResponseMetadata;
|
|
27
|
+
/**
|
|
28
|
+
* Structured error details when the request is unsuccessful.
|
|
29
|
+
*/
|
|
30
|
+
error?: APIError | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Metadata for the response. This will always contain a request ID which can be
|
|
34
|
+
* used to identify the request to Clear Street for tracing, and optionally may
|
|
35
|
+
* include pagination data.
|
|
36
|
+
*/
|
|
37
|
+
export interface ResponseMetadata {
|
|
38
|
+
/**
|
|
39
|
+
* A unique ID for this request, generated upon ingestion of the request.
|
|
40
|
+
*/
|
|
41
|
+
request_id: string;
|
|
42
|
+
/**
|
|
43
|
+
* Base64URL-encoded pagination token
|
|
44
|
+
*/
|
|
45
|
+
next_page_token?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Pagination. Included if this was a GET (list) response
|
|
48
|
+
*/
|
|
49
|
+
page_number?: number | null;
|
|
50
|
+
/**
|
|
51
|
+
* Base64URL-encoded pagination token
|
|
52
|
+
*/
|
|
53
|
+
previous_page_token?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Total number of items available (not just in this page).
|
|
56
|
+
*/
|
|
57
|
+
total_items?: number | null;
|
|
58
|
+
/**
|
|
59
|
+
* Total number of pages available.
|
|
60
|
+
*/
|
|
61
|
+
total_pages?: number | null;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../shared.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Manage trading accounts, balances, and portfolio history.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Accounts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Fetch account balance information
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v1.accounts.getAccountBalances(0);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
getAccountBalances(accountID: number, query?: AccountGetAccountBalancesParams | null | undefined, options?: RequestOptions): APIPromise<AccountGetAccountBalancesResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Fetch account details by ID
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.v1.accounts.getAccountByID(0);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
getAccountByID(accountID: number, options?: RequestOptions): APIPromise<AccountGetAccountByIDResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* List accounts the authenticated user has permission to access
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.v1.accounts.getAccounts();
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
getAccounts(query?: AccountGetAccountsParams | null | undefined, options?: RequestOptions): APIPromise<AccountGetAccountsResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves daily portfolio history for the specified account.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response =
|
|
43
|
+
* await client.v1.accounts.getPortfolioHistory(0, {
|
|
44
|
+
* start_date: '2019-12-27',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
getPortfolioHistory(accountID: number, query: AccountGetPortfolioHistoryParams, options?: RequestOptions): APIPromise<AccountGetPortfolioHistoryResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Update account risk settings
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const response = await client.v1.accounts.patchAccountByID(
|
|
55
|
+
* 0,
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
patchAccountByID(accountID: number, body: AccountPatchAccountByIDParams, options?: RequestOptions): APIPromise<AccountPatchAccountByIDResponse>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Represents a trading account
|
|
63
|
+
*/
|
|
64
|
+
export interface Account {
|
|
65
|
+
/**
|
|
66
|
+
* The unique identifier for the account
|
|
67
|
+
*/
|
|
68
|
+
id: number;
|
|
69
|
+
/**
|
|
70
|
+
* The account holder entity identifier
|
|
71
|
+
*/
|
|
72
|
+
account_holder_entity_id: number;
|
|
73
|
+
/**
|
|
74
|
+
* The full legal name of the account
|
|
75
|
+
*/
|
|
76
|
+
full_name: string;
|
|
77
|
+
/**
|
|
78
|
+
* The date the account was opened
|
|
79
|
+
*/
|
|
80
|
+
open_date: string;
|
|
81
|
+
/**
|
|
82
|
+
* The options level of the account
|
|
83
|
+
*/
|
|
84
|
+
options_level: number;
|
|
85
|
+
/**
|
|
86
|
+
* The short name of the account
|
|
87
|
+
*/
|
|
88
|
+
short_name: string;
|
|
89
|
+
/**
|
|
90
|
+
* The current status of the account
|
|
91
|
+
*/
|
|
92
|
+
status: AccountStatus;
|
|
93
|
+
/**
|
|
94
|
+
* The sub-type of account
|
|
95
|
+
*/
|
|
96
|
+
subtype: AccountSubtype;
|
|
97
|
+
/**
|
|
98
|
+
* The type of account
|
|
99
|
+
*/
|
|
100
|
+
type: AccountType;
|
|
101
|
+
/**
|
|
102
|
+
* The date the account was closed, if applicable
|
|
103
|
+
*/
|
|
104
|
+
close_date?: string | null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Represents the balance details for a trading account
|
|
108
|
+
*/
|
|
109
|
+
export interface AccountBalances {
|
|
110
|
+
/**
|
|
111
|
+
* The unique identifier for the account
|
|
112
|
+
*/
|
|
113
|
+
account_id: number;
|
|
114
|
+
/**
|
|
115
|
+
* The total buying power available in the account.
|
|
116
|
+
*/
|
|
117
|
+
buying_power: string;
|
|
118
|
+
/**
|
|
119
|
+
* Currency identifier for all monetary values.
|
|
120
|
+
*/
|
|
121
|
+
currency: string;
|
|
122
|
+
/**
|
|
123
|
+
* Realized profit or loss since start of day.
|
|
124
|
+
*/
|
|
125
|
+
daily_realized_pnl: string;
|
|
126
|
+
/**
|
|
127
|
+
* Total profit or loss since start of day.
|
|
128
|
+
*/
|
|
129
|
+
daily_total_pnl: string;
|
|
130
|
+
/**
|
|
131
|
+
* Total unrealized profit or loss across all positions relative to prior close.
|
|
132
|
+
*/
|
|
133
|
+
daily_unrealized_pnl: string;
|
|
134
|
+
/**
|
|
135
|
+
* The total equity in the account.
|
|
136
|
+
*/
|
|
137
|
+
equity: string;
|
|
138
|
+
/**
|
|
139
|
+
* The total market value of all long positions.
|
|
140
|
+
*/
|
|
141
|
+
long_market_value: string;
|
|
142
|
+
/**
|
|
143
|
+
* The applicable margin model for the account
|
|
144
|
+
*/
|
|
145
|
+
margin_type: MarginType;
|
|
146
|
+
/**
|
|
147
|
+
* Signed buying-power correction from open orders.
|
|
148
|
+
*/
|
|
149
|
+
open_order_adjustment: string;
|
|
150
|
+
/**
|
|
151
|
+
* The amount of cash that is settled and available for withdrawal or trading.
|
|
152
|
+
*/
|
|
153
|
+
settled_cash: string;
|
|
154
|
+
/**
|
|
155
|
+
* Start-of-day snapshot balances.
|
|
156
|
+
*/
|
|
157
|
+
sod: AccountBalancesSod;
|
|
158
|
+
/**
|
|
159
|
+
* Trade-date effective cash.
|
|
160
|
+
*/
|
|
161
|
+
trade_cash: string;
|
|
162
|
+
/**
|
|
163
|
+
* Trade-date unsettled cash credits.
|
|
164
|
+
*/
|
|
165
|
+
unsettled_credits: string;
|
|
166
|
+
/**
|
|
167
|
+
* Trade-date unsettled cash debits.
|
|
168
|
+
*/
|
|
169
|
+
unsettled_debits: string;
|
|
170
|
+
/**
|
|
171
|
+
* The amount of cash currently available to withdraw.
|
|
172
|
+
*/
|
|
173
|
+
withdrawable_cash: string;
|
|
174
|
+
/**
|
|
175
|
+
* Margin-account-only details.
|
|
176
|
+
*/
|
|
177
|
+
margin_details?: MarginDetails | null;
|
|
178
|
+
/**
|
|
179
|
+
* Applied multiplier for margin calculations.
|
|
180
|
+
*/
|
|
181
|
+
multiplier?: string | null;
|
|
182
|
+
/**
|
|
183
|
+
* The total market value of all short positions.
|
|
184
|
+
*/
|
|
185
|
+
short_market_value?: string | null;
|
|
186
|
+
}
|
|
187
|
+
export interface AccountBalancesSod {
|
|
188
|
+
/**
|
|
189
|
+
* Start-of-day buying power.
|
|
190
|
+
*/
|
|
191
|
+
buying_power: string;
|
|
192
|
+
/**
|
|
193
|
+
* Start-of-day equity.
|
|
194
|
+
*/
|
|
195
|
+
equity: string;
|
|
196
|
+
/**
|
|
197
|
+
* Start-of-day long market value.
|
|
198
|
+
*/
|
|
199
|
+
long_market_value: string;
|
|
200
|
+
/**
|
|
201
|
+
* Start-of-day short market value.
|
|
202
|
+
*/
|
|
203
|
+
short_market_value: string;
|
|
204
|
+
/**
|
|
205
|
+
* Timestamp for the start-of-day values.
|
|
206
|
+
*/
|
|
207
|
+
asof?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Start-of-day day-trade buying power.
|
|
210
|
+
*/
|
|
211
|
+
day_trade_buying_power?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Start-of-day maintenance margin excess.
|
|
214
|
+
*/
|
|
215
|
+
maintenance_margin_excess?: string | null;
|
|
216
|
+
/**
|
|
217
|
+
* Start-of-day maintenance margin requirement.
|
|
218
|
+
*/
|
|
219
|
+
maintenance_margin_requirement?: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Start-of-day trade cash.
|
|
222
|
+
*/
|
|
223
|
+
trade_cash?: string | null;
|
|
224
|
+
}
|
|
225
|
+
export type AccountList = Array<Account>;
|
|
226
|
+
export interface AccountSettings {
|
|
227
|
+
/**
|
|
228
|
+
* Risk settings for the account
|
|
229
|
+
*/
|
|
230
|
+
risk?: RiskSettings | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Account status
|
|
234
|
+
*/
|
|
235
|
+
export type AccountStatus = 'ACTIVE' | 'INACTIVE' | 'CLOSED';
|
|
236
|
+
/**
|
|
237
|
+
* Account subtype classification providing more granular categorization
|
|
238
|
+
*/
|
|
239
|
+
export type AccountSubtype = 'CASH' | 'MARGIN' | 'OTHER';
|
|
240
|
+
/**
|
|
241
|
+
* Account type classification
|
|
242
|
+
*/
|
|
243
|
+
export type AccountType = 'CUSTOMER' | 'OTHER';
|
|
244
|
+
export interface MarginDetails {
|
|
245
|
+
/**
|
|
246
|
+
* The number of day trades executed over the 5 most recent trading days.
|
|
247
|
+
*/
|
|
248
|
+
day_trade_count: number;
|
|
249
|
+
/**
|
|
250
|
+
* Initial margin excess for trade-date balances.
|
|
251
|
+
*/
|
|
252
|
+
initial_margin_excess: string;
|
|
253
|
+
/**
|
|
254
|
+
* Initial margin requirement for trade-date balances.
|
|
255
|
+
*/
|
|
256
|
+
initial_margin_requirement: string;
|
|
257
|
+
/**
|
|
258
|
+
* Maintenance margin excess for trade-date balances.
|
|
259
|
+
*/
|
|
260
|
+
maintenance_margin_excess: string;
|
|
261
|
+
/**
|
|
262
|
+
* Maintenance margin requirement for trade-date balances.
|
|
263
|
+
*/
|
|
264
|
+
maintenance_margin_requirement: string;
|
|
265
|
+
/**
|
|
266
|
+
* `true` if the account is currently flagged as a PDT, otherwise `false`.
|
|
267
|
+
*/
|
|
268
|
+
pattern_day_trader: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* The amount of day-trade buying power used during the current trading day.
|
|
271
|
+
*/
|
|
272
|
+
day_trade_buying_power_usage?: string | null;
|
|
273
|
+
/**
|
|
274
|
+
* Optional top margin contributors, returned only when explicitly requested.
|
|
275
|
+
*/
|
|
276
|
+
top_contributors?: Array<MarginTopContributor>;
|
|
277
|
+
/**
|
|
278
|
+
* Current usage totals.
|
|
279
|
+
*/
|
|
280
|
+
usage?: MarginDetailsUsage | null;
|
|
281
|
+
}
|
|
282
|
+
export interface MarginDetailsUsage {
|
|
283
|
+
/**
|
|
284
|
+
* The total margin available in the current model.
|
|
285
|
+
*/
|
|
286
|
+
total: string;
|
|
287
|
+
/**
|
|
288
|
+
* The amount of margin that is currently being utilized.
|
|
289
|
+
*/
|
|
290
|
+
used: string;
|
|
291
|
+
}
|
|
292
|
+
export interface MarginTopContributor {
|
|
293
|
+
/**
|
|
294
|
+
* Day-trade buying power consumed by fills against this underlying on the current
|
|
295
|
+
* trade date. Populated only for pattern day trader accounts.
|
|
296
|
+
*/
|
|
297
|
+
day_trade_buying_power_usage: string;
|
|
298
|
+
/**
|
|
299
|
+
* Initial margin requirement attributable to this underlying.
|
|
300
|
+
*/
|
|
301
|
+
initial_margin_requirement: string;
|
|
302
|
+
/**
|
|
303
|
+
* Maintenance margin requirement attributable to this underlying.
|
|
304
|
+
*/
|
|
305
|
+
maintenance_margin_requirement: string;
|
|
306
|
+
/**
|
|
307
|
+
* Net market value attributable to this underlying.
|
|
308
|
+
*/
|
|
309
|
+
market_value: string;
|
|
310
|
+
/**
|
|
311
|
+
* UUID of the underlying security contributing to margin requirement.
|
|
312
|
+
*/
|
|
313
|
+
underlying_instrument_id: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* An account's margin type
|
|
317
|
+
*/
|
|
318
|
+
export type MarginType = 'OTHER' | 'NONE' | 'PORTFOLIO_MARGIN' | 'RISK_BASED_HAIRCUT_BROKER_DEALER' | 'REG_T' | 'RISK_BASED_HAIRCUT_MARKET_MAKER' | 'CIRO' | 'FUTURES_NLV' | 'FUTURES_TOT_EQ';
|
|
319
|
+
export interface PortfolioHistoryResponse {
|
|
320
|
+
segments: Array<PortfolioHistorySegment>;
|
|
321
|
+
}
|
|
322
|
+
export interface PortfolioHistorySegment {
|
|
323
|
+
/**
|
|
324
|
+
* The date for this segment
|
|
325
|
+
*/
|
|
326
|
+
date: string;
|
|
327
|
+
/**
|
|
328
|
+
* The equity at the end of the trading day.
|
|
329
|
+
*/
|
|
330
|
+
eod_equity: string;
|
|
331
|
+
/**
|
|
332
|
+
* Sum of the profit and loss realized from position closing trading activity.
|
|
333
|
+
*/
|
|
334
|
+
realized_pnl: string;
|
|
335
|
+
/**
|
|
336
|
+
* The equity at the start of the trading day.
|
|
337
|
+
*/
|
|
338
|
+
sod_equity: string;
|
|
339
|
+
/**
|
|
340
|
+
* Sum of the profit and loss from market changes.
|
|
341
|
+
*/
|
|
342
|
+
unrealized_pnl: string;
|
|
343
|
+
/**
|
|
344
|
+
* Amount bought MTM
|
|
345
|
+
*/
|
|
346
|
+
bought_notional?: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* Sum of the profit and loss from intraday trading activities for the trading day.
|
|
349
|
+
*/
|
|
350
|
+
day_pnl?: string | null;
|
|
351
|
+
/**
|
|
352
|
+
* P&L after netting all realized and unrealized P&L, adjustments, dividends,
|
|
353
|
+
* change in accruals, income and expenses
|
|
354
|
+
*/
|
|
355
|
+
net_pnl?: string | null;
|
|
356
|
+
/**
|
|
357
|
+
* P&L attributable to start-of-day (carried) positions from market movement during
|
|
358
|
+
* this trading day.
|
|
359
|
+
*/
|
|
360
|
+
position_pnl?: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* Amount sold MTM
|
|
363
|
+
*/
|
|
364
|
+
sold_notional?: string | null;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Risk settings for an account
|
|
368
|
+
*/
|
|
369
|
+
export interface RiskSettings {
|
|
370
|
+
/**
|
|
371
|
+
* The maximum notional value available to the account
|
|
372
|
+
*/
|
|
373
|
+
max_notional?: string | null;
|
|
374
|
+
}
|
|
375
|
+
export interface AccountGetAccountBalancesResponse extends Shared.BaseResponse {
|
|
376
|
+
/**
|
|
377
|
+
* Represents the balance details for a trading account
|
|
378
|
+
*/
|
|
379
|
+
data: AccountBalances;
|
|
380
|
+
}
|
|
381
|
+
export interface AccountGetAccountByIDResponse extends Shared.BaseResponse {
|
|
382
|
+
/**
|
|
383
|
+
* Represents a trading account
|
|
384
|
+
*/
|
|
385
|
+
data: Account;
|
|
386
|
+
}
|
|
387
|
+
export interface AccountGetAccountsResponse extends Shared.BaseResponse {
|
|
388
|
+
data: AccountList;
|
|
389
|
+
}
|
|
390
|
+
export interface AccountGetPortfolioHistoryResponse extends Shared.BaseResponse {
|
|
391
|
+
data: PortfolioHistoryResponse;
|
|
392
|
+
}
|
|
393
|
+
export interface AccountPatchAccountByIDResponse extends Shared.BaseResponse {
|
|
394
|
+
data: AccountSettings;
|
|
395
|
+
}
|
|
396
|
+
export interface AccountGetAccountBalancesParams {
|
|
397
|
+
/**
|
|
398
|
+
* Limit the number of top margin contributors returned by the engine.
|
|
399
|
+
*/
|
|
400
|
+
top_margin_contributors_limit?: number;
|
|
401
|
+
}
|
|
402
|
+
export interface AccountGetAccountsParams {
|
|
403
|
+
/**
|
|
404
|
+
* The number of items to return per page. Only used when page_token is not
|
|
405
|
+
* provided.
|
|
406
|
+
*/
|
|
407
|
+
page_size?: number;
|
|
408
|
+
/**
|
|
409
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
410
|
+
* pagination state; when provided, page_size is ignored.
|
|
411
|
+
*/
|
|
412
|
+
page_token?: string;
|
|
413
|
+
}
|
|
414
|
+
export interface AccountGetPortfolioHistoryParams {
|
|
415
|
+
/**
|
|
416
|
+
* Start date for the portfolio history range, in YYYY-MM-DD format.
|
|
417
|
+
*/
|
|
418
|
+
start_date: string;
|
|
419
|
+
/**
|
|
420
|
+
* Defaults to today in America/New_York when omitted.
|
|
421
|
+
*/
|
|
422
|
+
end_date?: string;
|
|
423
|
+
}
|
|
424
|
+
export interface AccountPatchAccountByIDParams {
|
|
425
|
+
/**
|
|
426
|
+
* Risk settings for the account
|
|
427
|
+
*/
|
|
428
|
+
risk?: RiskSettings | null;
|
|
429
|
+
}
|
|
430
|
+
export declare namespace Accounts {
|
|
431
|
+
export { type Account as Account, type AccountBalances as AccountBalances, type AccountBalancesSod as AccountBalancesSod, type AccountList as AccountList, type AccountSettings as AccountSettings, type AccountStatus as AccountStatus, type AccountSubtype as AccountSubtype, type AccountType as AccountType, type MarginDetails as MarginDetails, type MarginDetailsUsage as MarginDetailsUsage, type MarginTopContributor as MarginTopContributor, type MarginType as MarginType, type PortfolioHistoryResponse as PortfolioHistoryResponse, type PortfolioHistorySegment as PortfolioHistorySegment, type RiskSettings as RiskSettings, type AccountGetAccountBalancesResponse as AccountGetAccountBalancesResponse, type AccountGetAccountByIDResponse as AccountGetAccountByIDResponse, type AccountGetAccountsResponse as AccountGetAccountsResponse, type AccountGetPortfolioHistoryResponse as AccountGetPortfolioHistoryResponse, type AccountPatchAccountByIDResponse as AccountPatchAccountByIDResponse, type AccountGetAccountBalancesParams as AccountGetAccountBalancesParams, type AccountGetAccountsParams as AccountGetAccountsParams, type AccountGetPortfolioHistoryParams as AccountGetPortfolioHistoryParams, type AccountPatchAccountByIDParams as AccountPatchAccountByIDParams, };
|
|
432
|
+
}
|
|
433
|
+
//# sourceMappingURL=accounts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/v1/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;OAOG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAItG;;;;;;;OAOG;IACH,WAAW,CACT,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;OAUG;IACH,mBAAmB,CACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,gCAAgC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kCAAkC,CAAC;IAIjD;;;;;;;;;OASG;IACH,gBAAgB,CACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;CAG/C;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB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