@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,471 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as Shared from "../shared.js";
|
|
3
|
+
import * as OrdersAPI from "./orders.js";
|
|
4
|
+
import * as V1API from "./v1.js";
|
|
5
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve core details and discovery endpoints for tradable instruments.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Instruments extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves detailed information for a specific instrument.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1.instruments.getInstrumentByID(
|
|
18
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
getInstrumentByID(instrumentID: OrdersAPI.InstrumentIDOrSymbol, query?: InstrumentGetInstrumentByIDParams | null | undefined, options?: RequestOptions): APIPromise<InstrumentGetInstrumentByIDResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a list of tradeable instruments.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const response =
|
|
29
|
+
* await client.v1.instruments.getInstruments();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
getInstruments(query?: InstrumentGetInstrumentsParams | null | undefined, options?: RequestOptions): APIPromise<InstrumentGetInstrumentsResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* List options contracts.
|
|
35
|
+
*
|
|
36
|
+
* Returns options contracts for a given underlier with options-specific metadata.
|
|
37
|
+
* Exactly one underlier identifier must be provided.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const response =
|
|
42
|
+
* await client.v1.instruments.getOptionContracts();
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
getOptionContracts(query?: InstrumentGetOptionContractsParams | null | undefined, options?: RequestOptions): APIPromise<InstrumentGetOptionContractsResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Search instruments by symbol, alternate identifier, or company name.
|
|
48
|
+
*
|
|
49
|
+
* The `q` parameter is case-insensitive and supports ticker symbols, alternate
|
|
50
|
+
* identifiers such as CUSIP, ISIN, OPRA root, and CMS identifiers, and company
|
|
51
|
+
* names for non-option instruments. Results are ranked by match quality plus
|
|
52
|
+
* instrument quality signals including log-scaled ADV, listing status,
|
|
53
|
+
* marginability, easy-to-borrow status, and OTC, restricted, and liquidation-only
|
|
54
|
+
* penalties. Defaults to the `EQUITY` asset class (common stocks, preferred
|
|
55
|
+
* shares, ADRs, ETFs, and exchange-traded mutual funds). Pass `asset_class=OPTION`
|
|
56
|
+
* to search option contracts by symbol or alternate identifier.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const response =
|
|
61
|
+
* await client.v1.instruments.searchInstruments({ q: 'q' });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
searchInstruments(query: InstrumentSearchInstrumentsParams, options?: RequestOptions): APIPromise<InstrumentSearchInstrumentsResponse>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The type of options contract
|
|
68
|
+
*/
|
|
69
|
+
export type ContractType = 'CALL' | 'PUT';
|
|
70
|
+
/**
|
|
71
|
+
* The exercise style of an options contract
|
|
72
|
+
*/
|
|
73
|
+
export type ExerciseStyle = 'AMERICAN' | 'EUROPEAN';
|
|
74
|
+
/**
|
|
75
|
+
* Represents a tradable financial instrument.
|
|
76
|
+
*/
|
|
77
|
+
export interface Instrument {
|
|
78
|
+
/**
|
|
79
|
+
* Unique OEMS instrument identifier (UUID)
|
|
80
|
+
*/
|
|
81
|
+
id: string;
|
|
82
|
+
/**
|
|
83
|
+
* The ISO country code of the instrument's issue
|
|
84
|
+
*/
|
|
85
|
+
country_of_issue: string;
|
|
86
|
+
/**
|
|
87
|
+
* The ISO currency code in which the instrument is traded
|
|
88
|
+
*/
|
|
89
|
+
currency: string;
|
|
90
|
+
/**
|
|
91
|
+
* Indicates if the instrument is classified as Easy-To-Borrow
|
|
92
|
+
*/
|
|
93
|
+
easy_to_borrow: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Indicates if the instrument supports fractional-quantity orders
|
|
96
|
+
*/
|
|
97
|
+
is_fractionable: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Indicates if the instrument is liquidation only and cannot be bought
|
|
100
|
+
*/
|
|
101
|
+
is_liquidation_only: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Indicates if the instrument is marginable
|
|
104
|
+
*/
|
|
105
|
+
is_marginable: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates if the instrument is a publicly traded partnership (PTP). PTP sales
|
|
108
|
+
* are subject to a 10% withholding tax for non-US tax residents.
|
|
109
|
+
*/
|
|
110
|
+
is_ptp: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Indicates if short selling is prohibited for the instrument
|
|
113
|
+
*/
|
|
114
|
+
is_short_prohibited: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Indicates if the instrument is on the Regulation SHO Threshold Security List
|
|
117
|
+
*/
|
|
118
|
+
is_threshold_security: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Indicates if the instrument is tradable
|
|
121
|
+
*/
|
|
122
|
+
is_tradable: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* The trading symbol for the instrument
|
|
125
|
+
*/
|
|
126
|
+
symbol: string;
|
|
127
|
+
/**
|
|
128
|
+
* The MIC code of the primary listing venue
|
|
129
|
+
*/
|
|
130
|
+
venue: string;
|
|
131
|
+
/**
|
|
132
|
+
* Average daily share volume from the security definition.
|
|
133
|
+
*/
|
|
134
|
+
adv?: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* The expiration date for options instruments
|
|
137
|
+
*/
|
|
138
|
+
expiry?: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* The type of security (e.g., Common Stock, ETF)
|
|
141
|
+
*/
|
|
142
|
+
instrument_type?: V1API.SecurityType | null;
|
|
143
|
+
/**
|
|
144
|
+
* The percent of a long position's value you must post as margin
|
|
145
|
+
*/
|
|
146
|
+
long_margin_rate?: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* The full name of the instrument or its issuer
|
|
149
|
+
*/
|
|
150
|
+
name?: string | null;
|
|
151
|
+
/**
|
|
152
|
+
* Notional ADV (`adv × previous_close`). The primary liquidity signal used by
|
|
153
|
+
* `/instruments/search` ranking. Computed at response time so it stays consistent
|
|
154
|
+
* with whatever `adv` and `previous_close` show.
|
|
155
|
+
*/
|
|
156
|
+
notional_adv?: string | null;
|
|
157
|
+
/**
|
|
158
|
+
* Available options expiration dates for this instrument. Present only when
|
|
159
|
+
* `include_options_expiry_dates=true` in the request.
|
|
160
|
+
*/
|
|
161
|
+
options_expiry_dates?: Array<string> | null;
|
|
162
|
+
/**
|
|
163
|
+
* Last close price from the security definition.
|
|
164
|
+
*/
|
|
165
|
+
previous_close?: string | null;
|
|
166
|
+
/**
|
|
167
|
+
* The percent of a short position's value you must post as margin
|
|
168
|
+
*/
|
|
169
|
+
short_margin_rate?: string | null;
|
|
170
|
+
/**
|
|
171
|
+
* The strike price for options instruments
|
|
172
|
+
*/
|
|
173
|
+
strike_price?: string | null;
|
|
174
|
+
}
|
|
175
|
+
export interface InstrumentCore {
|
|
176
|
+
/**
|
|
177
|
+
* Unique OEMS instrument identifier (UUID)
|
|
178
|
+
*/
|
|
179
|
+
id: string;
|
|
180
|
+
/**
|
|
181
|
+
* The ISO country code of the instrument's issue
|
|
182
|
+
*/
|
|
183
|
+
country_of_issue: string;
|
|
184
|
+
/**
|
|
185
|
+
* The ISO currency code in which the instrument is traded
|
|
186
|
+
*/
|
|
187
|
+
currency: string;
|
|
188
|
+
/**
|
|
189
|
+
* Indicates if the instrument is classified as Easy-To-Borrow
|
|
190
|
+
*/
|
|
191
|
+
easy_to_borrow: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Indicates if the instrument supports fractional-quantity orders
|
|
194
|
+
*/
|
|
195
|
+
is_fractionable: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Indicates if the instrument is liquidation only and cannot be bought
|
|
198
|
+
*/
|
|
199
|
+
is_liquidation_only: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Indicates if the instrument is marginable
|
|
202
|
+
*/
|
|
203
|
+
is_marginable: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Indicates if the instrument is a publicly traded partnership (PTP). PTP sales
|
|
206
|
+
* are subject to a 10% withholding tax for non-US tax residents.
|
|
207
|
+
*/
|
|
208
|
+
is_ptp: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Indicates if short selling is prohibited for the instrument
|
|
211
|
+
*/
|
|
212
|
+
is_short_prohibited: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Indicates if the instrument is on the Regulation SHO Threshold Security List
|
|
215
|
+
*/
|
|
216
|
+
is_threshold_security: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Indicates if the instrument is tradable
|
|
219
|
+
*/
|
|
220
|
+
is_tradable: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* The trading symbol for the instrument
|
|
223
|
+
*/
|
|
224
|
+
symbol: string;
|
|
225
|
+
/**
|
|
226
|
+
* The MIC code of the primary listing venue
|
|
227
|
+
*/
|
|
228
|
+
venue: string;
|
|
229
|
+
/**
|
|
230
|
+
* Average daily share volume from the security definition.
|
|
231
|
+
*/
|
|
232
|
+
adv?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* The expiration date for options instruments
|
|
235
|
+
*/
|
|
236
|
+
expiry?: string | null;
|
|
237
|
+
/**
|
|
238
|
+
* The type of security (e.g., Common Stock, ETF)
|
|
239
|
+
*/
|
|
240
|
+
instrument_type?: V1API.SecurityType | null;
|
|
241
|
+
/**
|
|
242
|
+
* The percent of a long position's value you must post as margin
|
|
243
|
+
*/
|
|
244
|
+
long_margin_rate?: string | null;
|
|
245
|
+
/**
|
|
246
|
+
* The full name of the instrument or its issuer
|
|
247
|
+
*/
|
|
248
|
+
name?: string | null;
|
|
249
|
+
/**
|
|
250
|
+
* Notional ADV (`adv × previous_close`). The primary liquidity signal used by
|
|
251
|
+
* `/instruments/search` ranking. Computed at response time so it stays consistent
|
|
252
|
+
* with whatever `adv` and `previous_close` show.
|
|
253
|
+
*/
|
|
254
|
+
notional_adv?: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* Last close price from the security definition.
|
|
257
|
+
*/
|
|
258
|
+
previous_close?: string | null;
|
|
259
|
+
/**
|
|
260
|
+
* The percent of a short position's value you must post as margin
|
|
261
|
+
*/
|
|
262
|
+
short_margin_rate?: string | null;
|
|
263
|
+
/**
|
|
264
|
+
* The strike price for options instruments
|
|
265
|
+
*/
|
|
266
|
+
strike_price?: string | null;
|
|
267
|
+
}
|
|
268
|
+
export type InstrumentCoreList = Array<InstrumentCore>;
|
|
269
|
+
/**
|
|
270
|
+
* The listing type of an options contract
|
|
271
|
+
*/
|
|
272
|
+
export type ListingType = 'STANDARD' | 'FLEX' | 'OTC';
|
|
273
|
+
/**
|
|
274
|
+
* An options contract with options-specific metadata
|
|
275
|
+
*/
|
|
276
|
+
export interface OptionsContract {
|
|
277
|
+
/**
|
|
278
|
+
* OEMS instrument identifier
|
|
279
|
+
*/
|
|
280
|
+
id: string;
|
|
281
|
+
/**
|
|
282
|
+
* Whether this is a CALL or PUT
|
|
283
|
+
*/
|
|
284
|
+
contract_type: ContractType;
|
|
285
|
+
/**
|
|
286
|
+
* ISO currency code
|
|
287
|
+
*/
|
|
288
|
+
currency: string;
|
|
289
|
+
/**
|
|
290
|
+
* MIC code of the primary listing venue
|
|
291
|
+
*/
|
|
292
|
+
exchange: string;
|
|
293
|
+
/**
|
|
294
|
+
* Exercise style
|
|
295
|
+
*/
|
|
296
|
+
exercise_style: ExerciseStyle;
|
|
297
|
+
/**
|
|
298
|
+
* Expiration date
|
|
299
|
+
*/
|
|
300
|
+
expiry: string;
|
|
301
|
+
/**
|
|
302
|
+
* Whether the contract is liquidation-only
|
|
303
|
+
*/
|
|
304
|
+
is_liquidation_only: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Whether the contract is marginable
|
|
307
|
+
*/
|
|
308
|
+
is_marginable: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* Listing type
|
|
311
|
+
*/
|
|
312
|
+
listing_type: ListingType;
|
|
313
|
+
/**
|
|
314
|
+
* Contract multiplier (100 for standard options)
|
|
315
|
+
*/
|
|
316
|
+
multiplier: string;
|
|
317
|
+
/**
|
|
318
|
+
* Strike price
|
|
319
|
+
*/
|
|
320
|
+
strike_price: string;
|
|
321
|
+
/**
|
|
322
|
+
* OSI symbol (e.g. "AAPL 251219C00150000")
|
|
323
|
+
*/
|
|
324
|
+
symbol: string;
|
|
325
|
+
/**
|
|
326
|
+
* Open interest (number of outstanding contracts), if available
|
|
327
|
+
*/
|
|
328
|
+
open_interest?: number | null;
|
|
329
|
+
/**
|
|
330
|
+
* OEMS instrument ID of the underlying instrument, if resolvable
|
|
331
|
+
*/
|
|
332
|
+
underlying_instrument_id?: string | null;
|
|
333
|
+
}
|
|
334
|
+
export type OptionsContractList = Array<OptionsContract>;
|
|
335
|
+
export interface InstrumentGetInstrumentByIDResponse extends Shared.BaseResponse {
|
|
336
|
+
/**
|
|
337
|
+
* Represents a tradable financial instrument.
|
|
338
|
+
*/
|
|
339
|
+
data: Instrument;
|
|
340
|
+
}
|
|
341
|
+
export interface InstrumentGetInstrumentsResponse extends Shared.BaseResponse {
|
|
342
|
+
data: InstrumentCoreList;
|
|
343
|
+
}
|
|
344
|
+
export interface InstrumentGetOptionContractsResponse extends Shared.BaseResponse {
|
|
345
|
+
data: OptionsContractList;
|
|
346
|
+
}
|
|
347
|
+
export interface InstrumentSearchInstrumentsResponse extends Shared.BaseResponse {
|
|
348
|
+
data: InstrumentCoreList;
|
|
349
|
+
}
|
|
350
|
+
export interface InstrumentGetInstrumentByIDParams {
|
|
351
|
+
/**
|
|
352
|
+
* When true, include unique options expiry dates for this instrument
|
|
353
|
+
*/
|
|
354
|
+
include_options_expiry_dates?: boolean | null;
|
|
355
|
+
}
|
|
356
|
+
export interface InstrumentGetInstrumentsParams {
|
|
357
|
+
/**
|
|
358
|
+
* Filter by easy to borrow status
|
|
359
|
+
*/
|
|
360
|
+
easy_to_borrow?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Comma-separated OEMS instrument UUIDs
|
|
363
|
+
*/
|
|
364
|
+
instrument_ids?: Array<string>;
|
|
365
|
+
/**
|
|
366
|
+
* Filter by instrument type (e.g. COMMON_STOCK, OPTION)
|
|
367
|
+
*/
|
|
368
|
+
instrument_type?: 'COMMON_STOCK' | 'OPTION' | 'CASH';
|
|
369
|
+
/**
|
|
370
|
+
* Filter by liquidation only status
|
|
371
|
+
*/
|
|
372
|
+
is_liquidation_only?: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Filter by marginable status
|
|
375
|
+
*/
|
|
376
|
+
is_marginable?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Filter by publicly traded partnership (PTP) status
|
|
379
|
+
*/
|
|
380
|
+
is_ptp?: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Filter by short prohibited status
|
|
383
|
+
*/
|
|
384
|
+
is_short_prohibited?: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Filter by threshold security status
|
|
387
|
+
*/
|
|
388
|
+
is_threshold_security?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* The number of items to return per page. Only used when page_token is not
|
|
391
|
+
* provided.
|
|
392
|
+
*/
|
|
393
|
+
page_size?: number;
|
|
394
|
+
/**
|
|
395
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
396
|
+
* pagination state; when provided, page_size is ignored.
|
|
397
|
+
*/
|
|
398
|
+
page_token?: string;
|
|
399
|
+
}
|
|
400
|
+
export interface InstrumentGetOptionContractsParams {
|
|
401
|
+
/**
|
|
402
|
+
* Filter by contract type: CALL or PUT
|
|
403
|
+
*/
|
|
404
|
+
contract_type?: ContractType;
|
|
405
|
+
/**
|
|
406
|
+
* Filter to contracts expiring on this date (YYYY-MM-DD)
|
|
407
|
+
*/
|
|
408
|
+
expiry?: string;
|
|
409
|
+
/**
|
|
410
|
+
* The number of items to return per page. Only used when page_token is not
|
|
411
|
+
* provided.
|
|
412
|
+
*/
|
|
413
|
+
page_size?: number;
|
|
414
|
+
/**
|
|
415
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
416
|
+
* pagination state; when provided, page_size is ignored.
|
|
417
|
+
*/
|
|
418
|
+
page_token?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Underlier symbol (e.g., AAPL, SPX)
|
|
421
|
+
*/
|
|
422
|
+
underlier?: string;
|
|
423
|
+
/**
|
|
424
|
+
* OEMS instrument UUID or symbol of the underlying equity/index
|
|
425
|
+
*/
|
|
426
|
+
underlying_instrument_id?: OrdersAPI.InstrumentIDOrSymbol;
|
|
427
|
+
}
|
|
428
|
+
export interface InstrumentSearchInstrumentsParams {
|
|
429
|
+
/**
|
|
430
|
+
* Search term applied case-insensitively to ticker symbols, alternate identifiers
|
|
431
|
+
* (CUSIP, ISIN, OPRA root, CMS), and company names for non-option instruments.
|
|
432
|
+
* Option searches match symbols and alternate identifiers.
|
|
433
|
+
*/
|
|
434
|
+
q: string;
|
|
435
|
+
/**
|
|
436
|
+
* Comma-separated asset classes (EQUITY|OPTION|WARRANT|BOND|FX|OTHER). Defaults to
|
|
437
|
+
* EQUITY.
|
|
438
|
+
*/
|
|
439
|
+
asset_class?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Optional listing-country filter (e.g., US).
|
|
442
|
+
*/
|
|
443
|
+
country?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Optional ISO currency filter (e.g., USD).
|
|
446
|
+
*/
|
|
447
|
+
currency?: string;
|
|
448
|
+
/**
|
|
449
|
+
* Include inactive instruments. Default false.
|
|
450
|
+
*/
|
|
451
|
+
include_inactive?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Include publicly traded partnership (PTP) instruments. Default true (penalized
|
|
454
|
+
* in ranking).
|
|
455
|
+
*/
|
|
456
|
+
include_ptp?: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* The number of items to return per page. Only used when page_token is not
|
|
459
|
+
* provided.
|
|
460
|
+
*/
|
|
461
|
+
page_size?: number;
|
|
462
|
+
/**
|
|
463
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
464
|
+
* pagination state; when provided, page_size is ignored.
|
|
465
|
+
*/
|
|
466
|
+
page_token?: string;
|
|
467
|
+
}
|
|
468
|
+
export declare namespace Instruments {
|
|
469
|
+
export { type ContractType as ContractType, type ExerciseStyle as ExerciseStyle, type Instrument as Instrument, type InstrumentCore as InstrumentCore, type InstrumentCoreList as InstrumentCoreList, type ListingType as ListingType, type OptionsContract as OptionsContract, type OptionsContractList as OptionsContractList, type InstrumentGetInstrumentByIDResponse as InstrumentGetInstrumentByIDResponse, type InstrumentGetInstrumentsResponse as InstrumentGetInstrumentsResponse, type InstrumentGetOptionContractsResponse as InstrumentGetOptionContractsResponse, type InstrumentSearchInstrumentsResponse as InstrumentSearchInstrumentsResponse, type InstrumentGetInstrumentByIDParams as InstrumentGetInstrumentByIDParams, type InstrumentGetInstrumentsParams as InstrumentGetInstrumentsParams, type InstrumentGetOptionContractsParams as InstrumentGetOptionContractsParams, type InstrumentSearchInstrumentsParams as InstrumentSearchInstrumentsParams, };
|
|
470
|
+
}
|
|
471
|
+
//# sourceMappingURL=instruments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instruments.d.ts","sourceRoot":"","sources":["../../src/resources/v1/instruments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,KAAK,KAAK,gBAAa;AAC9B,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,iBAAiB,CACf,YAAY,EAAE,SAAS,CAAC,oBAAoB,EAC5C,KAAK,GAAE,iCAAiC,GAAG,IAAI,GAAG,SAAc,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;IAIlD;;;;;;;;OAQG;IACH,cAAc,CACZ,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gCAAgC,CAAC;IAI/C;;;;;;;;;;;OAWG;IACH,kBAAkB,CAChB,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAInD;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CACf,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,CAAC;AAE1C;;GAEG;A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M,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Instruments = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve core details and discovery endpoints for tradable instruments.
|
|
9
|
+
*/
|
|
10
|
+
class Instruments extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves detailed information for a specific instrument.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1.instruments.getInstrumentByID(
|
|
18
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
getInstrumentByID(instrumentID, query = {}, options) {
|
|
23
|
+
return this._client.get((0, path_1.path) `/v1/instruments/${instrumentID}`, { query, ...options });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a list of tradeable instruments.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const response =
|
|
31
|
+
* await client.v1.instruments.getInstruments();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
getInstruments(query = {}, options) {
|
|
35
|
+
return this._client.get('/v1/instruments', { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* List options contracts.
|
|
39
|
+
*
|
|
40
|
+
* Returns options contracts for a given underlier with options-specific metadata.
|
|
41
|
+
* Exactly one underlier identifier must be provided.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response =
|
|
46
|
+
* await client.v1.instruments.getOptionContracts();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
getOptionContracts(query = {}, options) {
|
|
50
|
+
return this._client.get('/v1/instruments/options/contracts', { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Search instruments by symbol, alternate identifier, or company name.
|
|
54
|
+
*
|
|
55
|
+
* The `q` parameter is case-insensitive and supports ticker symbols, alternate
|
|
56
|
+
* identifiers such as CUSIP, ISIN, OPRA root, and CMS identifiers, and company
|
|
57
|
+
* names for non-option instruments. Results are ranked by match quality plus
|
|
58
|
+
* instrument quality signals including log-scaled ADV, listing status,
|
|
59
|
+
* marginability, easy-to-borrow status, and OTC, restricted, and liquidation-only
|
|
60
|
+
* penalties. Defaults to the `EQUITY` asset class (common stocks, preferred
|
|
61
|
+
* shares, ADRs, ETFs, and exchange-traded mutual funds). Pass `asset_class=OPTION`
|
|
62
|
+
* to search option contracts by symbol or alternate identifier.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response =
|
|
67
|
+
* await client.v1.instruments.searchInstruments({ q: 'q' });
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
searchInstruments(query, options) {
|
|
71
|
+
return this._client.get('/v1/instruments/search', { query, ...options });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Instruments = Instruments;
|
|
75
|
+
//# sourceMappingURL=instruments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instruments.js","sourceRoot":"","sources":["../../src/resources/v1/instruments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;OAUG;IACH,iBAAiB,CACf,YAA4C,EAC5C,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CACZ,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,kBAAkB,CAChB,QAA+D,EAAE,EACjE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AA/ED,kCA+EC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve core details and discovery endpoints for tradable instruments.
|
|
6
|
+
*/
|
|
7
|
+
export class Instruments extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves detailed information for a specific instrument.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.v1.instruments.getInstrumentByID(
|
|
15
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
getInstrumentByID(instrumentID, query = {}, options) {
|
|
20
|
+
return this._client.get(path `/v1/instruments/${instrumentID}`, { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a list of tradeable instruments.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response =
|
|
28
|
+
* await client.v1.instruments.getInstruments();
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
getInstruments(query = {}, options) {
|
|
32
|
+
return this._client.get('/v1/instruments', { query, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* List options contracts.
|
|
36
|
+
*
|
|
37
|
+
* Returns options contracts for a given underlier with options-specific metadata.
|
|
38
|
+
* Exactly one underlier identifier must be provided.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response =
|
|
43
|
+
* await client.v1.instruments.getOptionContracts();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
getOptionContracts(query = {}, options) {
|
|
47
|
+
return this._client.get('/v1/instruments/options/contracts', { query, ...options });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Search instruments by symbol, alternate identifier, or company name.
|
|
51
|
+
*
|
|
52
|
+
* The `q` parameter is case-insensitive and supports ticker symbols, alternate
|
|
53
|
+
* identifiers such as CUSIP, ISIN, OPRA root, and CMS identifiers, and company
|
|
54
|
+
* names for non-option instruments. Results are ranked by match quality plus
|
|
55
|
+
* instrument quality signals including log-scaled ADV, listing status,
|
|
56
|
+
* marginability, easy-to-borrow status, and OTC, restricted, and liquidation-only
|
|
57
|
+
* penalties. Defaults to the `EQUITY` asset class (common stocks, preferred
|
|
58
|
+
* shares, ADRs, ETFs, and exchange-traded mutual funds). Pass `asset_class=OPTION`
|
|
59
|
+
* to search option contracts by symbol or alternate identifier.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const response =
|
|
64
|
+
* await client.v1.instruments.searchInstruments({ q: 'q' });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
searchInstruments(query, options) {
|
|
68
|
+
return this._client.get('/v1/instruments/search', { query, ...options });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=instruments.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instruments.mjs","sourceRoot":"","sources":["../../src/resources/v1/instruments.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;OAUG;IACH,iBAAiB,CACf,YAA4C,EAC5C,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,YAAY,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CACZ,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,kBAAkB,CAChB,QAA+D,EAAE,EACjE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF"}
|