@clear-street/studio-sdk 0.1.0-alpha.10

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.
Files changed (305) hide show
  1. package/CHANGELOG.md +135 -0
  2. package/LICENSE +201 -0
  3. package/README.md +290 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +242 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +901 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +869 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +53 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +143 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +127 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +144 -0
  87. package/index.d.ts +144 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +122 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +94 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +103 -0
  94. package/resource.d.ts +6 -0
  95. package/resource.d.ts.map +1 -0
  96. package/resource.js +11 -0
  97. package/resource.js.map +1 -0
  98. package/resource.mjs +7 -0
  99. package/resource.mjs.map +1 -0
  100. package/resources/accounts/accounts.d.ts +84 -0
  101. package/resources/accounts/accounts.d.ts.map +1 -0
  102. package/resources/accounts/accounts.js +79 -0
  103. package/resources/accounts/accounts.js.map +1 -0
  104. package/resources/accounts/accounts.mjs +52 -0
  105. package/resources/accounts/accounts.mjs.map +1 -0
  106. package/resources/accounts/bulk-orders.d.ts +134 -0
  107. package/resources/accounts/bulk-orders.d.ts.map +1 -0
  108. package/resources/accounts/bulk-orders.js +29 -0
  109. package/resources/accounts/bulk-orders.js.map +1 -0
  110. package/resources/accounts/bulk-orders.mjs +25 -0
  111. package/resources/accounts/bulk-orders.mjs.map +1 -0
  112. package/resources/accounts/easy-borrows.d.ts +17 -0
  113. package/resources/accounts/easy-borrows.d.ts.map +1 -0
  114. package/resources/accounts/easy-borrows.js +18 -0
  115. package/resources/accounts/easy-borrows.js.map +1 -0
  116. package/resources/accounts/easy-borrows.mjs +14 -0
  117. package/resources/accounts/easy-borrows.mjs.map +1 -0
  118. package/resources/accounts/holdings.d.ts +73 -0
  119. package/resources/accounts/holdings.d.ts.map +1 -0
  120. package/resources/accounts/holdings.js +18 -0
  121. package/resources/accounts/holdings.js.map +1 -0
  122. package/resources/accounts/holdings.mjs +14 -0
  123. package/resources/accounts/holdings.mjs.map +1 -0
  124. package/resources/accounts/index.d.ts +12 -0
  125. package/resources/accounts/index.d.ts.map +1 -0
  126. package/resources/accounts/index.js +27 -0
  127. package/resources/accounts/index.js.map +1 -0
  128. package/resources/accounts/index.mjs +13 -0
  129. package/resources/accounts/index.mjs.map +1 -0
  130. package/resources/accounts/locate-orders.d.ts +56 -0
  131. package/resources/accounts/locate-orders.d.ts.map +1 -0
  132. package/resources/accounts/locate-orders.js +39 -0
  133. package/resources/accounts/locate-orders.js.map +1 -0
  134. package/resources/accounts/locate-orders.mjs +35 -0
  135. package/resources/accounts/locate-orders.mjs.map +1 -0
  136. package/resources/accounts/orders.d.ts +164 -0
  137. package/resources/accounts/orders.d.ts.map +1 -0
  138. package/resources/accounts/orders.js +53 -0
  139. package/resources/accounts/orders.js.map +1 -0
  140. package/resources/accounts/orders.mjs +49 -0
  141. package/resources/accounts/orders.mjs.map +1 -0
  142. package/resources/accounts/pnl-details.d.ts +113 -0
  143. package/resources/accounts/pnl-details.d.ts.map +1 -0
  144. package/resources/accounts/pnl-details.js +17 -0
  145. package/resources/accounts/pnl-details.js.map +1 -0
  146. package/resources/accounts/pnl-details.mjs +13 -0
  147. package/resources/accounts/pnl-details.mjs.map +1 -0
  148. package/resources/accounts/pnl-summary.d.ts +10 -0
  149. package/resources/accounts/pnl-summary.d.ts.map +1 -0
  150. package/resources/accounts/pnl-summary.js +15 -0
  151. package/resources/accounts/pnl-summary.js.map +1 -0
  152. package/resources/accounts/pnl-summary.mjs +11 -0
  153. package/resources/accounts/pnl-summary.mjs.map +1 -0
  154. package/resources/accounts/pnl-sums.d.ts +138 -0
  155. package/resources/accounts/pnl-sums.d.ts.map +1 -0
  156. package/resources/accounts/pnl-sums.js +18 -0
  157. package/resources/accounts/pnl-sums.js.map +1 -0
  158. package/resources/accounts/pnl-sums.mjs +14 -0
  159. package/resources/accounts/pnl-sums.mjs.map +1 -0
  160. package/resources/accounts/positions.d.ts +37 -0
  161. package/resources/accounts/positions.d.ts.map +1 -0
  162. package/resources/accounts/positions.js +24 -0
  163. package/resources/accounts/positions.js.map +1 -0
  164. package/resources/accounts/positions.mjs +20 -0
  165. package/resources/accounts/positions.mjs.map +1 -0
  166. package/resources/accounts/trades.d.ts +37 -0
  167. package/resources/accounts/trades.d.ts.map +1 -0
  168. package/resources/accounts/trades.js +24 -0
  169. package/resources/accounts/trades.js.map +1 -0
  170. package/resources/accounts/trades.mjs +20 -0
  171. package/resources/accounts/trades.mjs.map +1 -0
  172. package/resources/entities/entities.d.ts +458 -0
  173. package/resources/entities/entities.d.ts.map +1 -0
  174. package/resources/entities/entities.js +61 -0
  175. package/resources/entities/entities.js.map +1 -0
  176. package/resources/entities/entities.mjs +34 -0
  177. package/resources/entities/entities.mjs.map +1 -0
  178. package/resources/entities/index.d.ts +6 -0
  179. package/resources/entities/index.d.ts.map +1 -0
  180. package/resources/entities/index.js +15 -0
  181. package/resources/entities/index.js.map +1 -0
  182. package/resources/entities/index.mjs +7 -0
  183. package/resources/entities/index.mjs.map +1 -0
  184. package/resources/entities/pnl-summaries.d.ts +10 -0
  185. package/resources/entities/pnl-summaries.d.ts.map +1 -0
  186. package/resources/entities/pnl-summaries.js +15 -0
  187. package/resources/entities/pnl-summaries.js.map +1 -0
  188. package/resources/entities/pnl-summaries.mjs +11 -0
  189. package/resources/entities/pnl-summaries.mjs.map +1 -0
  190. package/resources/entities/portfolio-margins.d.ts +10 -0
  191. package/resources/entities/portfolio-margins.d.ts.map +1 -0
  192. package/resources/entities/portfolio-margins.js +15 -0
  193. package/resources/entities/portfolio-margins.js.map +1 -0
  194. package/resources/entities/portfolio-margins.mjs +11 -0
  195. package/resources/entities/portfolio-margins.mjs.map +1 -0
  196. package/resources/entities/regt-margin-simulations.d.ts +97 -0
  197. package/resources/entities/regt-margin-simulations.d.ts.map +1 -0
  198. package/resources/entities/regt-margin-simulations.js +30 -0
  199. package/resources/entities/regt-margin-simulations.js.map +1 -0
  200. package/resources/entities/regt-margin-simulations.mjs +26 -0
  201. package/resources/entities/regt-margin-simulations.mjs.map +1 -0
  202. package/resources/entities/regt-margins.d.ts +10 -0
  203. package/resources/entities/regt-margins.d.ts.map +1 -0
  204. package/resources/entities/regt-margins.js +15 -0
  205. package/resources/entities/regt-margins.js.map +1 -0
  206. package/resources/entities/regt-margins.mjs +11 -0
  207. package/resources/entities/regt-margins.mjs.map +1 -0
  208. package/resources/index.d.ts +5 -0
  209. package/resources/index.d.ts.map +1 -0
  210. package/resources/index.js +26 -0
  211. package/resources/index.js.map +1 -0
  212. package/resources/index.mjs +6 -0
  213. package/resources/index.mjs.map +1 -0
  214. package/resources/instruments.d.ts +45 -0
  215. package/resources/instruments.d.ts.map +1 -0
  216. package/resources/instruments.js +18 -0
  217. package/resources/instruments.js.map +1 -0
  218. package/resources/instruments.mjs +14 -0
  219. package/resources/instruments.mjs.map +1 -0
  220. package/resources/shared.d.ts +332 -0
  221. package/resources/shared.d.ts.map +1 -0
  222. package/resources/shared.js +4 -0
  223. package/resources/shared.js.map +1 -0
  224. package/resources/shared.mjs +3 -0
  225. package/resources/shared.mjs.map +1 -0
  226. package/shims/node.d.ts +30 -0
  227. package/shims/node.d.ts.map +1 -0
  228. package/shims/node.js +31 -0
  229. package/shims/node.js.map +1 -0
  230. package/shims/node.mjs +5 -0
  231. package/shims/node.mjs.map +1 -0
  232. package/shims/web.d.ts +26 -0
  233. package/shims/web.d.ts.map +1 -0
  234. package/shims/web.js +31 -0
  235. package/shims/web.js.map +1 -0
  236. package/shims/web.mjs +5 -0
  237. package/shims/web.mjs.map +1 -0
  238. package/src/_shims/MultipartBody.ts +9 -0
  239. package/src/_shims/README.md +46 -0
  240. package/src/_shims/auto/runtime-bun.ts +4 -0
  241. package/src/_shims/auto/runtime-node.ts +4 -0
  242. package/src/_shims/auto/runtime.ts +4 -0
  243. package/src/_shims/auto/types-node.ts +4 -0
  244. package/src/_shims/auto/types.d.ts +101 -0
  245. package/src/_shims/auto/types.js +3 -0
  246. package/src/_shims/auto/types.mjs +3 -0
  247. package/src/_shims/bun-runtime.ts +14 -0
  248. package/src/_shims/index.d.ts +81 -0
  249. package/src/_shims/index.js +13 -0
  250. package/src/_shims/index.mjs +7 -0
  251. package/src/_shims/manual-types.d.ts +12 -0
  252. package/src/_shims/manual-types.js +3 -0
  253. package/src/_shims/manual-types.mjs +3 -0
  254. package/src/_shims/node-runtime.ts +81 -0
  255. package/src/_shims/node-types.d.ts +42 -0
  256. package/src/_shims/node-types.js +3 -0
  257. package/src/_shims/node-types.mjs +3 -0
  258. package/src/_shims/registry.ts +67 -0
  259. package/src/_shims/web-runtime.ts +103 -0
  260. package/src/_shims/web-types.d.ts +83 -0
  261. package/src/_shims/web-types.js +3 -0
  262. package/src/_shims/web-types.mjs +3 -0
  263. package/src/core.ts +1190 -0
  264. package/src/error.ts +146 -0
  265. package/src/index.ts +231 -0
  266. package/src/lib/.keep +4 -0
  267. package/src/resource.ts +11 -0
  268. package/src/resources/accounts/accounts.ts +97 -0
  269. package/src/resources/accounts/bulk-orders.ts +161 -0
  270. package/src/resources/accounts/easy-borrows.ts +23 -0
  271. package/src/resources/accounts/holdings.ts +103 -0
  272. package/src/resources/accounts/index.ts +27 -0
  273. package/src/resources/accounts/locate-orders.ts +94 -0
  274. package/src/resources/accounts/orders.ts +243 -0
  275. package/src/resources/accounts/pnl-details.ts +143 -0
  276. package/src/resources/accounts/pnl-summary.ts +14 -0
  277. package/src/resources/accounts/pnl-sums.ts +176 -0
  278. package/src/resources/accounts/positions.ts +66 -0
  279. package/src/resources/accounts/trades.ts +62 -0
  280. package/src/resources/entities/entities.ts +562 -0
  281. package/src/resources/entities/index.ts +12 -0
  282. package/src/resources/entities/pnl-summaries.ts +14 -0
  283. package/src/resources/entities/portfolio-margins.ts +14 -0
  284. package/src/resources/entities/regt-margin-simulations.ts +127 -0
  285. package/src/resources/entities/regt-margins.ts +14 -0
  286. package/src/resources/index.ts +13 -0
  287. package/src/resources/instruments.ts +70 -0
  288. package/src/resources/shared.ts +428 -0
  289. package/src/shims/node.ts +50 -0
  290. package/src/shims/web.ts +50 -0
  291. package/src/tsconfig.json +11 -0
  292. package/src/uploads.ts +255 -0
  293. package/src/version.ts +1 -0
  294. package/uploads.d.ts +75 -0
  295. package/uploads.d.ts.map +1 -0
  296. package/uploads.js +171 -0
  297. package/uploads.js.map +1 -0
  298. package/uploads.mjs +158 -0
  299. package/uploads.mjs.map +1 -0
  300. package/version.d.ts +2 -0
  301. package/version.d.ts.map +1 -0
  302. package/version.js +5 -0
  303. package/version.js.map +1 -0
  304. package/version.mjs +2 -0
  305. package/version.mjs.map +1 -0
package/index.d.ts ADDED
@@ -0,0 +1,144 @@
1
+ import * as Errors from "./error.js";
2
+ import * as Uploads from "./uploads.js";
3
+ import { type Agent } from "./_shims/index.js";
4
+ import * as Core from "./core.js";
5
+ import * as API from "./resources/index.js";
6
+ declare const environments: {
7
+ production: string;
8
+ sandbox: string;
9
+ };
10
+ type Environment = keyof typeof environments;
11
+ export interface ClientOptions {
12
+ /**
13
+ * Defaults to process.env['STUDIO_SDK_BEARER_TOKEN'].
14
+ */
15
+ bearerToken?: string | undefined;
16
+ /**
17
+ * Specifies the environment to use for the API.
18
+ *
19
+ * Each environment maps to a different base URL:
20
+ * - `production` corresponds to `https://api.clearstreet.io/studio/v2`
21
+ * - `sandbox` corresponds to `https://sandbox-api.clearstreet.io/studio/v2`
22
+ */
23
+ environment?: Environment;
24
+ /**
25
+ * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
26
+ *
27
+ * Defaults to process.env['STUDIO_SDK_BASE_URL'].
28
+ */
29
+ baseURL?: string | null | undefined;
30
+ /**
31
+ * The maximum amount of time (in milliseconds) that the client should wait for a response
32
+ * from the server before timing out a single request.
33
+ *
34
+ * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
35
+ * much longer than this timeout before the promise succeeds or fails.
36
+ */
37
+ timeout?: number;
38
+ /**
39
+ * An HTTP agent used to manage HTTP(S) connections.
40
+ *
41
+ * If not provided, an agent will be constructed by default in the Node.js environment,
42
+ * otherwise no agent is used.
43
+ */
44
+ httpAgent?: Agent;
45
+ /**
46
+ * Specify a custom `fetch` function implementation.
47
+ *
48
+ * If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
49
+ * defined globally.
50
+ */
51
+ fetch?: Core.Fetch | undefined;
52
+ /**
53
+ * The maximum number of times that the client will retry a request in case of a
54
+ * temporary failure, like a network error or a 5XX error from the server.
55
+ *
56
+ * @default 2
57
+ */
58
+ maxRetries?: number;
59
+ /**
60
+ * Default headers to include with every request to the API.
61
+ *
62
+ * These can be removed in individual requests by explicitly setting the
63
+ * header to `undefined` or `null` in request options.
64
+ */
65
+ defaultHeaders?: Core.Headers;
66
+ /**
67
+ * Default query parameters to include with every request to the API.
68
+ *
69
+ * These can be removed in individual requests by explicitly setting the
70
+ * param to `undefined` in request options.
71
+ */
72
+ defaultQuery?: Core.DefaultQuery;
73
+ }
74
+ /**
75
+ * API Client for interfacing with the Studio SDK API.
76
+ */
77
+ export declare class StudioSDK extends Core.APIClient {
78
+ bearerToken: string;
79
+ private _options;
80
+ /**
81
+ * API Client for interfacing with the Studio SDK API.
82
+ *
83
+ * @param {string | undefined} [opts.bearerToken=process.env['STUDIO_SDK_BEARER_TOKEN'] ?? undefined]
84
+ * @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
85
+ * @param {string} [opts.baseURL=process.env['STUDIO_SDK_BASE_URL'] ?? https://api.clearstreet.io/studio/v2] - Override the default base URL for the API.
86
+ * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
87
+ * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
88
+ * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
89
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
90
+ * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
91
+ * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
92
+ */
93
+ constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
94
+ entities: API.Entities;
95
+ accounts: API.Accounts;
96
+ instruments: API.Instruments;
97
+ protected defaultQuery(): Core.DefaultQuery | undefined;
98
+ protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
99
+ protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
100
+ static StudioSDK: typeof StudioSDK;
101
+ static DEFAULT_TIMEOUT: number;
102
+ static StudioSDKError: typeof Errors.StudioSDKError;
103
+ static APIError: typeof Errors.APIError;
104
+ static APIConnectionError: typeof Errors.APIConnectionError;
105
+ static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
106
+ static APIUserAbortError: typeof Errors.APIUserAbortError;
107
+ static NotFoundError: typeof Errors.NotFoundError;
108
+ static ConflictError: typeof Errors.ConflictError;
109
+ static RateLimitError: typeof Errors.RateLimitError;
110
+ static BadRequestError: typeof Errors.BadRequestError;
111
+ static AuthenticationError: typeof Errors.AuthenticationError;
112
+ static InternalServerError: typeof Errors.InternalServerError;
113
+ static PermissionDeniedError: typeof Errors.PermissionDeniedError;
114
+ static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
115
+ static toFile: typeof Uploads.toFile;
116
+ static fileFromPath: typeof Uploads.fileFromPath;
117
+ }
118
+ export declare const StudioSDKError: typeof Errors.StudioSDKError, APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
119
+ export import toFile = Uploads.toFile;
120
+ export import fileFromPath = Uploads.fileFromPath;
121
+ export declare namespace StudioSDK {
122
+ export import RequestOptions = Core.RequestOptions;
123
+ export import Entities = API.Entities;
124
+ export import Entity = API.Entity;
125
+ export import PnlSummary = API.PnlSummary;
126
+ export import PortfolioMargin = API.PortfolioMargin;
127
+ export import RegtMargin = API.RegtMargin;
128
+ export import EntityListResponse = API.EntityListResponse;
129
+ export import Accounts = API.Accounts;
130
+ export import Account = API.Account;
131
+ export import AccountListResponse = API.AccountListResponse;
132
+ export import Instruments = API.Instruments;
133
+ export import Instrument = API.Instrument;
134
+ export import InstrumentRetrieveParams = API.InstrumentRetrieveParams;
135
+ export import BaseStrategy = API.BaseStrategy;
136
+ export import LocateOrder = API.LocateOrder;
137
+ export import Order = API.Order;
138
+ export import Position = API.Position;
139
+ export import RegtMarginSimulation = API.RegtMarginSimulation;
140
+ export import Strategy = API.Strategy;
141
+ export import Trade = API.Trade;
142
+ }
143
+ export default StudioSDK;
144
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AAEzC,QAAA,MAAM,YAAY;;;CAGjB,CAAC;AACF,KAAK,WAAW,GAAG,MAAM,OAAO,YAAY,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAElB;;;;;OAKG;IACH,KAAK,C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AEtE,MAAM,QAAQ,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC9C,MAAM,QAAQ,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAC5C,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAChC,MAAM,QAAQ,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACtC,MAAM,QAAQ,oBAAoB,GAAG,GAAG,CAAC,oBAAoB,CAAC;IAC9D,MAAM,QAAQ,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACtC,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;CACjC;AAED,eAAe,SAAS,CAAC"}
package/index.js ADDED
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ var _a;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.fileFromPath = exports.toFile = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.StudioSDKError = exports.StudioSDK = void 0;
29
+ const Errors = __importStar(require("./error.js"));
30
+ const Uploads = __importStar(require("./uploads.js"));
31
+ const Core = __importStar(require("./core.js"));
32
+ const API = __importStar(require("./resources/index.js"));
33
+ const environments = {
34
+ production: 'https://api.clearstreet.io/studio/v2',
35
+ sandbox: 'https://sandbox-api.clearstreet.io/studio/v2',
36
+ };
37
+ /**
38
+ * API Client for interfacing with the Studio SDK API.
39
+ */
40
+ class StudioSDK extends Core.APIClient {
41
+ /**
42
+ * API Client for interfacing with the Studio SDK API.
43
+ *
44
+ * @param {string | undefined} [opts.bearerToken=process.env['STUDIO_SDK_BEARER_TOKEN'] ?? undefined]
45
+ * @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
46
+ * @param {string} [opts.baseURL=process.env['STUDIO_SDK_BASE_URL'] ?? https://api.clearstreet.io/studio/v2] - Override the default base URL for the API.
47
+ * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
48
+ * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
49
+ * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
50
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
51
+ * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
52
+ * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
53
+ */
54
+ constructor({ baseURL = Core.readEnv('STUDIO_SDK_BASE_URL'), bearerToken = Core.readEnv('STUDIO_SDK_BEARER_TOKEN'), ...opts } = {}) {
55
+ if (bearerToken === undefined) {
56
+ throw new Errors.StudioSDKError("The STUDIO_SDK_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the StudioSDK client with an bearerToken option, like new StudioSDK({ bearerToken: 'My Bearer Token' }).");
57
+ }
58
+ const options = {
59
+ bearerToken,
60
+ ...opts,
61
+ baseURL,
62
+ environment: opts.environment ?? 'production',
63
+ };
64
+ if (baseURL && opts.environment) {
65
+ throw new Errors.StudioSDKError('Ambiguous URL; The `baseURL` option (or STUDIO_SDK_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null');
66
+ }
67
+ super({
68
+ baseURL: options.baseURL || environments[options.environment || 'production'],
69
+ timeout: options.timeout ?? 60000 /* 1 minute */,
70
+ httpAgent: options.httpAgent,
71
+ maxRetries: options.maxRetries,
72
+ fetch: options.fetch,
73
+ });
74
+ this.entities = new API.Entities(this);
75
+ this.accounts = new API.Accounts(this);
76
+ this.instruments = new API.Instruments(this);
77
+ this._options = options;
78
+ this.bearerToken = bearerToken;
79
+ }
80
+ defaultQuery() {
81
+ return this._options.defaultQuery;
82
+ }
83
+ defaultHeaders(opts) {
84
+ return {
85
+ ...super.defaultHeaders(opts),
86
+ ...this._options.defaultHeaders,
87
+ };
88
+ }
89
+ authHeaders(opts) {
90
+ return { Authorization: `Bearer ${this.bearerToken}` };
91
+ }
92
+ }
93
+ exports.StudioSDK = StudioSDK;
94
+ _a = StudioSDK;
95
+ StudioSDK.StudioSDK = _a;
96
+ StudioSDK.DEFAULT_TIMEOUT = 60000; // 1 minute
97
+ StudioSDK.StudioSDKError = Errors.StudioSDKError;
98
+ StudioSDK.APIError = Errors.APIError;
99
+ StudioSDK.APIConnectionError = Errors.APIConnectionError;
100
+ StudioSDK.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
101
+ StudioSDK.APIUserAbortError = Errors.APIUserAbortError;
102
+ StudioSDK.NotFoundError = Errors.NotFoundError;
103
+ StudioSDK.ConflictError = Errors.ConflictError;
104
+ StudioSDK.RateLimitError = Errors.RateLimitError;
105
+ StudioSDK.BadRequestError = Errors.BadRequestError;
106
+ StudioSDK.AuthenticationError = Errors.AuthenticationError;
107
+ StudioSDK.InternalServerError = Errors.InternalServerError;
108
+ StudioSDK.PermissionDeniedError = Errors.PermissionDeniedError;
109
+ StudioSDK.UnprocessableEntityError = Errors.UnprocessableEntityError;
110
+ StudioSDK.toFile = Uploads.toFile;
111
+ StudioSDK.fileFromPath = Uploads.fileFromPath;
112
+ exports.StudioSDKError = Errors.StudioSDKError, exports.APIError = Errors.APIError, exports.APIConnectionError = Errors.APIConnectionError, exports.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError, exports.APIUserAbortError = Errors.APIUserAbortError, exports.NotFoundError = Errors.NotFoundError, exports.ConflictError = Errors.ConflictError, exports.RateLimitError = Errors.RateLimitError, exports.BadRequestError = Errors.BadRequestError, exports.AuthenticationError = Errors.AuthenticationError, exports.InternalServerError = Errors.InternalServerError, exports.PermissionDeniedError = Errors.PermissionDeniedError, exports.UnprocessableEntityError = Errors.UnprocessableEntityError;
113
+ exports.toFile = Uploads.toFile;
114
+ exports.fileFromPath = Uploads.fileFromPath;
115
+ (function (StudioSDK) {
116
+ StudioSDK.Entities = API.Entities;
117
+ StudioSDK.Accounts = API.Accounts;
118
+ StudioSDK.Instruments = API.Instruments;
119
+ })(StudioSDK = exports.StudioSDK || (exports.StudioSDK = {}));
120
+ exports = module.exports = StudioSDK;
121
+ exports.default = StudioSDK;
122
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,mDAAkC;AAClC,sDAAqC;AAErC,gDAA+B;AAC/B,0DAAyC;AAEzC,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,sCAAsC;IAClD,OAAO,EAAE,8CAA8C;CACxD,CAAC;AA2EF;;GAEG;AACH,MAAa,SAAU,SAAQ,IAAI,CAAC,SAAS;IAK3C;;;;;;;;;;;;OAYG;IACH,YA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BAJR,2BAAmB,GAIjB,MAAM,sBAHR,2BAAmB,GAGjB,MAAM,sBAFR,6BAAqB,GAEnB,MAAM,wBADR,gCAAwB,GACtB,MAAM,0BAAC;AAEG,QAAA,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,QAAA,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAElD,WAAiB,SAAS;IAGV,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAOxB,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAIxB,qBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAW9C,CAAC,EAzBgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAyBzB;AAED,kBAAe,SAAS,CAAC"}
package/index.mjs ADDED
@@ -0,0 +1,94 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ var _a;
3
+ import * as Errors from "./error.mjs";
4
+ import * as Uploads from "./uploads.mjs";
5
+ import * as Core from "./core.mjs";
6
+ import * as API from "./resources/index.mjs";
7
+ const environments = {
8
+ production: 'https://api.clearstreet.io/studio/v2',
9
+ sandbox: 'https://sandbox-api.clearstreet.io/studio/v2',
10
+ };
11
+ /**
12
+ * API Client for interfacing with the Studio SDK API.
13
+ */
14
+ export class StudioSDK extends Core.APIClient {
15
+ /**
16
+ * API Client for interfacing with the Studio SDK API.
17
+ *
18
+ * @param {string | undefined} [opts.bearerToken=process.env['STUDIO_SDK_BEARER_TOKEN'] ?? undefined]
19
+ * @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
20
+ * @param {string} [opts.baseURL=process.env['STUDIO_SDK_BASE_URL'] ?? https://api.clearstreet.io/studio/v2] - Override the default base URL for the API.
21
+ * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
22
+ * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
23
+ * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
24
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
25
+ * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
26
+ * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
27
+ */
28
+ constructor({ baseURL = Core.readEnv('STUDIO_SDK_BASE_URL'), bearerToken = Core.readEnv('STUDIO_SDK_BEARER_TOKEN'), ...opts } = {}) {
29
+ if (bearerToken === undefined) {
30
+ throw new Errors.StudioSDKError("The STUDIO_SDK_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the StudioSDK client with an bearerToken option, like new StudioSDK({ bearerToken: 'My Bearer Token' }).");
31
+ }
32
+ const options = {
33
+ bearerToken,
34
+ ...opts,
35
+ baseURL,
36
+ environment: opts.environment ?? 'production',
37
+ };
38
+ if (baseURL && opts.environment) {
39
+ throw new Errors.StudioSDKError('Ambiguous URL; The `baseURL` option (or STUDIO_SDK_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null');
40
+ }
41
+ super({
42
+ baseURL: options.baseURL || environments[options.environment || 'production'],
43
+ timeout: options.timeout ?? 60000 /* 1 minute */,
44
+ httpAgent: options.httpAgent,
45
+ maxRetries: options.maxRetries,
46
+ fetch: options.fetch,
47
+ });
48
+ this.entities = new API.Entities(this);
49
+ this.accounts = new API.Accounts(this);
50
+ this.instruments = new API.Instruments(this);
51
+ this._options = options;
52
+ this.bearerToken = bearerToken;
53
+ }
54
+ defaultQuery() {
55
+ return this._options.defaultQuery;
56
+ }
57
+ defaultHeaders(opts) {
58
+ return {
59
+ ...super.defaultHeaders(opts),
60
+ ...this._options.defaultHeaders,
61
+ };
62
+ }
63
+ authHeaders(opts) {
64
+ return { Authorization: `Bearer ${this.bearerToken}` };
65
+ }
66
+ }
67
+ _a = StudioSDK;
68
+ StudioSDK.StudioSDK = _a;
69
+ StudioSDK.DEFAULT_TIMEOUT = 60000; // 1 minute
70
+ StudioSDK.StudioSDKError = Errors.StudioSDKError;
71
+ StudioSDK.APIError = Errors.APIError;
72
+ StudioSDK.APIConnectionError = Errors.APIConnectionError;
73
+ StudioSDK.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
74
+ StudioSDK.APIUserAbortError = Errors.APIUserAbortError;
75
+ StudioSDK.NotFoundError = Errors.NotFoundError;
76
+ StudioSDK.ConflictError = Errors.ConflictError;
77
+ StudioSDK.RateLimitError = Errors.RateLimitError;
78
+ StudioSDK.BadRequestError = Errors.BadRequestError;
79
+ StudioSDK.AuthenticationError = Errors.AuthenticationError;
80
+ StudioSDK.InternalServerError = Errors.InternalServerError;
81
+ StudioSDK.PermissionDeniedError = Errors.PermissionDeniedError;
82
+ StudioSDK.UnprocessableEntityError = Errors.UnprocessableEntityError;
83
+ StudioSDK.toFile = Uploads.toFile;
84
+ StudioSDK.fileFromPath = Uploads.fileFromPath;
85
+ export const { StudioSDKError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } = Errors;
86
+ export var toFile = Uploads.toFile;
87
+ export var fileFromPath = Uploads.fileFromPath;
88
+ (function (StudioSDK) {
89
+ StudioSDK.Entities = API.Entities;
90
+ StudioSDK.Accounts = API.Accounts;
91
+ StudioSDK.Instruments = API.Instruments;
92
+ })(StudioSDK || (StudioSDK = {}));
93
+ export default StudioSDK;
94
+ //# sourceMappingURL=index.mjs.map
package/index.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAE/E,KAAK,MAAM;OACX,KAAK,OAAO;OAEZ,KAAK,IAAI;OACT,KAAK,GAAG;AAEf,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,sCAAsC;IAClD,OAAO,EAAE,8CAA8C;CACxD,CAAC;AA2EF;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,IA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AAC;AAEX,MAAM,KAAQ,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACtC,MAAM,KAAQ,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAElD,WAAiB,SAAS;IAGV,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAOxB,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAIxB,qBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAW9C,CAAC,EAzBgB,SAAS,KAAT,SAAS,QAyBzB;AAED,eAAe,SAAS,CAAC"}
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "@clear-street/studio-sdk",
3
+ "version": "0.1.0-alpha.10",
4
+ "description": "The official TypeScript library for the Studio SDK API",
5
+ "author": "Studio SDK <studiosupport@clearstreet.io>",
6
+ "types": "./index.d.ts",
7
+ "main": "./index.js",
8
+ "type": "commonjs",
9
+ "repository": "github:clear-street/studio-sdk-node",
10
+ "license": "Apache-2.0",
11
+ "packageManager": "yarn@1.22.22",
12
+ "files": [
13
+ "*"
14
+ ],
15
+ "private": false,
16
+ "scripts": {
17
+ "test": "./scripts/test",
18
+ "build": "./scripts/build",
19
+ "format": "prettier --write --cache --cache-strategy metadata . !dist",
20
+ "tsn": "ts-node -r tsconfig-paths/register",
21
+ "lint": "./scripts/lint",
22
+ "fix": "./scripts/format"
23
+ },
24
+ "dependencies": {
25
+ "@types/node": "^18.11.18",
26
+ "@types/node-fetch": "^2.6.4",
27
+ "abort-controller": "^3.0.0",
28
+ "agentkeepalive": "^4.2.1",
29
+ "form-data-encoder": "1.7.2",
30
+ "formdata-node": "^4.3.2",
31
+ "node-fetch": "^2.6.7"
32
+ },
33
+ "sideEffects": [
34
+ "./_shims/index.js",
35
+ "./_shims/index.mjs",
36
+ "./shims/node.js",
37
+ "./shims/node.mjs",
38
+ "./shims/web.js",
39
+ "./shims/web.mjs"
40
+ ],
41
+ "imports": {
42
+ "@clear-street/studio-sdk": ".",
43
+ "@clear-street/studio-sdk/*": "./src/*"
44
+ },
45
+ "exports": {
46
+ "./_shims/auto/*": {
47
+ "deno": {
48
+ "types": "./_shims/auto/*.d.ts",
49
+ "require": "./_shims/auto/*.js",
50
+ "default": "./_shims/auto/*.mjs"
51
+ },
52
+ "bun": {
53
+ "types": "./_shims/auto/*.d.ts",
54
+ "require": "./_shims/auto/*-bun.js",
55
+ "default": "./_shims/auto/*-bun.mjs"
56
+ },
57
+ "browser": {
58
+ "types": "./_shims/auto/*.d.ts",
59
+ "require": "./_shims/auto/*.js",
60
+ "default": "./_shims/auto/*.mjs"
61
+ },
62
+ "worker": {
63
+ "types": "./_shims/auto/*.d.ts",
64
+ "require": "./_shims/auto/*.js",
65
+ "default": "./_shims/auto/*.mjs"
66
+ },
67
+ "workerd": {
68
+ "types": "./_shims/auto/*.d.ts",
69
+ "require": "./_shims/auto/*.js",
70
+ "default": "./_shims/auto/*.mjs"
71
+ },
72
+ "node": {
73
+ "types": "./_shims/auto/*-node.d.ts",
74
+ "require": "./_shims/auto/*-node.js",
75
+ "default": "./_shims/auto/*-node.mjs"
76
+ },
77
+ "types": "./_shims/auto/*.d.ts",
78
+ "require": "./_shims/auto/*.js",
79
+ "default": "./_shims/auto/*.mjs"
80
+ },
81
+ ".": {
82
+ "require": {
83
+ "types": "./index.d.ts",
84
+ "default": "./index.js"
85
+ },
86
+ "types": "./index.d.mts",
87
+ "default": "./index.mjs"
88
+ },
89
+ "./*.mjs": {
90
+ "types": "./*.d.ts",
91
+ "default": "./*.mjs"
92
+ },
93
+ "./*.js": {
94
+ "types": "./*.d.ts",
95
+ "default": "./*.js"
96
+ },
97
+ "./*": {
98
+ "types": "./*.d.ts",
99
+ "require": "./*.js",
100
+ "default": "./*.mjs"
101
+ }
102
+ }
103
+ }
package/resource.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import type { StudioSDK } from "./index.js";
2
+ export declare class APIResource {
3
+ protected _client: StudioSDK;
4
+ constructor(client: StudioSDK);
5
+ }
6
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;gBAEjB,MAAM,EAAE,SAAS;CAG9B"}
package/resource.js ADDED
@@ -0,0 +1,11 @@
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.APIResource = void 0;
5
+ class APIResource {
6
+ constructor(client) {
7
+ this._client = client;
8
+ }
9
+ }
10
+ exports.APIResource = APIResource;
11
+ //# sourceMappingURL=resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAa,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF;AAND,kCAMC"}
package/resource.mjs ADDED
@@ -0,0 +1,7 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export class APIResource {
3
+ constructor(client) {
4
+ this._client = client;
5
+ }
6
+ }
7
+ //# sourceMappingURL=resource.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.mjs","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,84 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import * as AccountsAPI from "./accounts.js";
4
+ import * as BulkOrdersAPI from "./bulk-orders.js";
5
+ import * as EasyBorrowsAPI from "./easy-borrows.js";
6
+ import * as HoldingsAPI from "./holdings.js";
7
+ import * as LocateOrdersAPI from "./locate-orders.js";
8
+ import * as OrdersAPI from "./orders.js";
9
+ import * as PnlDetailsAPI from "./pnl-details.js";
10
+ import * as PnlSummaryAPI from "./pnl-summary.js";
11
+ import * as PnlSumsAPI from "./pnl-sums.js";
12
+ import * as PositionsAPI from "./positions.js";
13
+ import * as TradesAPI from "./trades.js";
14
+ export declare class Accounts extends APIResource {
15
+ bulkOrders: BulkOrdersAPI.BulkOrders;
16
+ orders: OrdersAPI.Orders;
17
+ trades: TradesAPI.Trades;
18
+ positions: PositionsAPI.Positions;
19
+ locateOrders: LocateOrdersAPI.LocateOrders;
20
+ easyBorrows: EasyBorrowsAPI.EasyBorrows;
21
+ pnlSummary: PnlSummaryAPI.PnlSummary;
22
+ pnlDetails: PnlDetailsAPI.PnlDetails;
23
+ pnlSums: PnlSumsAPI.PnlSums;
24
+ holdings: HoldingsAPI.Holdings;
25
+ /**
26
+ * Get an account by its ID.
27
+ */
28
+ retrieve(accountId: string, options?: Core.RequestOptions): Core.APIPromise<Account>;
29
+ /**
30
+ * List all available accounts.
31
+ */
32
+ list(options?: Core.RequestOptions): Core.APIPromise<AccountListResponse>;
33
+ }
34
+ export interface Account {
35
+ /**
36
+ * Account ID for the account.
37
+ */
38
+ account_id: string;
39
+ /**
40
+ * Entity ID for the legal entity.
41
+ */
42
+ entity_id: string;
43
+ name: string;
44
+ }
45
+ export interface AccountListResponse {
46
+ data?: Array<Account>;
47
+ }
48
+ export declare namespace Accounts {
49
+ export import Account = AccountsAPI.Account;
50
+ export import AccountListResponse = AccountsAPI.AccountListResponse;
51
+ export import BulkOrders = BulkOrdersAPI.BulkOrders;
52
+ export import BulkOrderCreateResponse = BulkOrdersAPI.BulkOrderCreateResponse;
53
+ export import BulkOrderCreateParams = BulkOrdersAPI.BulkOrderCreateParams;
54
+ export import Orders = OrdersAPI.Orders;
55
+ export import OrderCreateResponse = OrdersAPI.OrderCreateResponse;
56
+ export import OrderRetrieveResponse = OrdersAPI.OrderRetrieveResponse;
57
+ export import OrderListResponse = OrdersAPI.OrderListResponse;
58
+ export import OrderDeleteResponse = OrdersAPI.OrderDeleteResponse;
59
+ export import OrderCreateParams = OrdersAPI.OrderCreateParams;
60
+ export import OrderListParams = OrdersAPI.OrderListParams;
61
+ export import OrderDeleteParams = OrdersAPI.OrderDeleteParams;
62
+ export import Trades = TradesAPI.Trades;
63
+ export import TradeListResponse = TradesAPI.TradeListResponse;
64
+ export import TradeListParams = TradesAPI.TradeListParams;
65
+ export import Positions = PositionsAPI.Positions;
66
+ export import PositionListResponse = PositionsAPI.PositionListResponse;
67
+ export import PositionListParams = PositionsAPI.PositionListParams;
68
+ export import LocateOrders = LocateOrdersAPI.LocateOrders;
69
+ export import LocateOrderListResponse = LocateOrdersAPI.LocateOrderListResponse;
70
+ export import LocateOrderCreateParams = LocateOrdersAPI.LocateOrderCreateParams;
71
+ export import LocateOrderUpdateParams = LocateOrdersAPI.LocateOrderUpdateParams;
72
+ export import EasyBorrows = EasyBorrowsAPI.EasyBorrows;
73
+ export import EasyBorrowListResponse = EasyBorrowsAPI.EasyBorrowListResponse;
74
+ export import PnlSummary = PnlSummaryAPI.PnlSummary;
75
+ export import PnlDetails = PnlDetailsAPI.PnlDetails;
76
+ export import PnlDetailListResponse = PnlDetailsAPI.PnlDetailListResponse;
77
+ export import PnlSums = PnlSumsAPI.PnlSums;
78
+ export import PnlSumListResponse = PnlSumsAPI.PnlSumListResponse;
79
+ export import PnlSumListParams = PnlSumsAPI.PnlSumListParams;
80
+ export import Holdings = HoldingsAPI.Holdings;
81
+ export import HoldingListResponse = HoldingsAPI.HoldingListResponse;
82
+ export import HoldingListParams = HoldingsAPI.HoldingListParams;
83
+ }
84
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/resources/accounts/accounts.ts"],"names":[],"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