From 884f5a785ea47610ca690acba42b68d3af2a6517 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:11:49 +0000 Subject: [PATCH 1/2] feat(api): account number support (#70) --- .stats.yml | 2 +- src/resources/accounts/accounts.ts | 7 ++++++- src/resources/accounts/holdings.ts | 5 +++++ src/resources/accounts/inventories.ts | 5 +++++ src/resources/accounts/pnl-details.ts | 5 +++++ src/resources/accounts/pnl-sums.ts | 5 +++++ src/resources/accounts/positions.ts | 2 +- src/resources/shared.ts | 20 ++++++++++++++++++++ 8 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e6f8ff0..a5829a7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 31 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/clear-street%2Fstudio-sdk-5efb317738842339f6e8bd32592691a65d19a54adc34bfa319d6bac2404404a7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/clear-street%2Fstudio-sdk-507601d533175bf3b74a3b04c29d55029c585b24a4ec873bc43d93fe76528076.yml diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index 6db7b4c..8129757 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -54,7 +54,7 @@ export class Accounts extends APIResource { inventories: InventoriesAPI.Inventories = new InventoriesAPI.Inventories(this._client); /** - * Get an account by its ID. + * Get an account by its ID or number. */ retrieve(accountId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/accounts/${accountId}`, options); @@ -74,6 +74,11 @@ export interface Account { */ account_id: string; + /** + * Account number for the account. + */ + account_number: string; + /** * Entity ID for the legal entity. */ diff --git a/src/resources/accounts/holdings.ts b/src/resources/accounts/holdings.ts index 4bab3fd..e5489ba 100644 --- a/src/resources/accounts/holdings.ts +++ b/src/resources/accounts/holdings.ts @@ -37,6 +37,11 @@ export interface HoldingListResponse { */ account_id: string; + /** + * Account number for the account. + */ + account_number: string; + data: Array; /** diff --git a/src/resources/accounts/inventories.ts b/src/resources/accounts/inventories.ts index 9978410..89f002b 100644 --- a/src/resources/accounts/inventories.ts +++ b/src/resources/accounts/inventories.ts @@ -22,6 +22,11 @@ export interface InventoryRetrieveResponse { */ account_id?: string; + /** + * Account number for the account. + */ + account_number?: string; + /** * String representation of quantity. */ diff --git a/src/resources/accounts/pnl-details.ts b/src/resources/accounts/pnl-details.ts index cb3720e..99c13c1 100644 --- a/src/resources/accounts/pnl-details.ts +++ b/src/resources/accounts/pnl-details.ts @@ -23,6 +23,11 @@ export namespace PnlDetailListResponse { */ account_id: string; + /** + * Account number for the account. + */ + account_number: string; + /** * The asset class of the symbol. */ diff --git a/src/resources/accounts/pnl-sums.ts b/src/resources/accounts/pnl-sums.ts index 00507a3..575846d 100644 --- a/src/resources/accounts/pnl-sums.ts +++ b/src/resources/accounts/pnl-sums.ts @@ -23,6 +23,11 @@ export interface PnlSumListResponse { */ account_id?: string; + /** + * Account number for the account. + */ + account_number?: string; + data?: Array; /** diff --git a/src/resources/accounts/positions.ts b/src/resources/accounts/positions.ts index aded8f8..b4d2805 100644 --- a/src/resources/accounts/positions.ts +++ b/src/resources/accounts/positions.ts @@ -7,7 +7,7 @@ import * as Shared from '../shared'; export class Positions extends APIResource { /** - * Get current positions for a given account for a given symbol. + * Get current position for a given account for a given symbol. */ retrieve( accountId: string, diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 779f75a..1267101 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -31,6 +31,11 @@ export interface LocateOrder { */ account_id: string; + /** + * Account number for the account. + */ + account_number: string; + /** * Unique locate ID assigned by us. */ @@ -115,6 +120,11 @@ export interface Order { */ account_id: string; + /** + * Account number for the account. + */ + account_number: string; + /** * When the order was created in milliseconds since epoch. */ @@ -259,6 +269,11 @@ export interface Position { */ account_id?: string; + /** + * Account number for the account. + */ + account_number?: string; + /** * String representation of quantity. */ @@ -431,6 +446,11 @@ export interface Trade { */ account_id?: string; + /** + * Account number for the account. + */ + account_number?: string; + /** * The symbol this trade was for. */ From 23e5d1f65342df08a2bffff05c2b0bb4fdf76939 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:12:15 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.15 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index abc263a..54cfe49 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.14" + ".": "0.1.0-alpha.15" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 11565ca..648e014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.15 (2024-12-09) + +Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/clear-street/studio-sdk-node/compare/v0.1.0-alpha.14...v0.1.0-alpha.15) + +### Features + +* **api:** account number support ([#70](https://github.com/clear-street/studio-sdk-node/issues/70)) ([884f5a7](https://github.com/clear-street/studio-sdk-node/commit/884f5a785ea47610ca690acba42b68d3af2a6517)) + ## 0.1.0-alpha.14 (2024-11-29) Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/clear-street/studio-sdk-node/compare/v0.1.0-alpha.13...v0.1.0-alpha.14) diff --git a/package.json b/package.json index 3c4337e..6695bc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@clear-street/studio-sdk", - "version": "0.1.0-alpha.14", + "version": "0.1.0-alpha.15", "description": "The official TypeScript library for the Studio SDK API", "author": "Studio SDK ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index c36bf82..9872581 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.14'; // x-release-please-version +export const VERSION = '0.1.0-alpha.15'; // x-release-please-version