diff --git a/resources/trade-api.yaml b/resources/trade-api.yaml index eb423c6..ef4d489 100644 --- a/resources/trade-api.yaml +++ b/resources/trade-api.yaml @@ -203,17 +203,7 @@ components: $ref: './common.yaml#/components/schemas/SelfTradePreventionType' # TWAP-specific fields (only used when type is TIME_WEIGHTED_AVERAGE_PRICE) twapConfig: - type: object - properties: - subOrdersCount: - type: string - description: Number of sub-orders to split the total quantity into - example: "5" - runningTimeInMinutes: - type: string - description: Total time in minutes over which to execute the TWAP order - example: "30" - description: Configuration for Time-Weighted Average Price orders + $ref: '#/components/schemas/OrderTwapConfig' required: - signedFields @@ -221,6 +211,19 @@ components: - type - reduceOnly + OrderTwapConfig: + type: object + properties: + subOrdersCount: + type: string + description: Number of sub-orders to split the total quantity into + example: "5" + runningTimeInMinutes: + type: string + description: Total time in minutes over which to execute the TWAP order + example: "30" + description: Configuration for Time-Weighted Average Price orders + WithdrawRequest: type: object properties: @@ -410,6 +413,8 @@ components: $ref: './common.yaml#/components/schemas/OrderStatus' selfTradePreventionType: $ref: './common.yaml#/components/schemas/SelfTradePreventionType' + twapConfig: + $ref: '#/components/schemas/OrderTwapConfig' orderTimeAtMillis: type: integer format: int64 diff --git a/ts/sdk/package.json b/ts/sdk/package.json index 585c620..8af1bc5 100644 --- a/ts/sdk/package.json +++ b/ts/sdk/package.json @@ -51,5 +51,5 @@ "prepare": "npm run build" }, "types": "./dist/types/index.d.ts", - "version": "1.8.2" + "version": "1.8.3" } diff --git a/ts/sdk/src/.openapi-generator/FILES b/ts/sdk/src/.openapi-generator/FILES index d637d35..d94586f 100644 --- a/ts/sdk/src/.openapi-generator/FILES +++ b/ts/sdk/src/.openapi-generator/FILES @@ -56,7 +56,6 @@ docs/ContractsConfig.md docs/CountryResponse.md docs/CreateOrderRequest.md docs/CreateOrderRequestSignedFields.md -docs/CreateOrderRequestTwapConfig.md docs/CreateOrderResponse.md docs/EpochConfigs.md docs/EpochConfigsResponse.md @@ -102,6 +101,7 @@ docs/OrderCancellationUpdate.md docs/OrderSide.md docs/OrderStatus.md docs/OrderTimeInForce.md +docs/OrderTwapConfig.md docs/OrderType.md docs/OrderbookDepthResponse.md docs/OrderbookDiffDepthUpdate.md diff --git a/ts/sdk/src/api.ts b/ts/sdk/src/api.ts index ff3701a..21a6046 100644 --- a/ts/sdk/src/api.ts +++ b/ts/sdk/src/api.ts @@ -2185,10 +2185,10 @@ export interface CreateOrderRequest { 'selfTradePreventionType'?: SelfTradePreventionType; /** * - * @type {CreateOrderRequestTwapConfig} + * @type {OrderTwapConfig} * @memberof CreateOrderRequest */ - 'twapConfig'?: CreateOrderRequestTwapConfig; + 'twapConfig'?: OrderTwapConfig; } @@ -2267,25 +2267,6 @@ export interface CreateOrderRequestSignedFields { } -/** - * Configuration for Time-Weighted Average Price orders - * @export - * @interface CreateOrderRequestTwapConfig - */ -export interface CreateOrderRequestTwapConfig { - /** - * Number of sub-orders to split the total quantity into - * @type {string} - * @memberof CreateOrderRequestTwapConfig - */ - 'subOrdersCount'?: string; - /** - * Total time in minutes over which to execute the TWAP order - * @type {string} - * @memberof CreateOrderRequestTwapConfig - */ - 'runningTimeInMinutes'?: string; -} /** * * @export @@ -3653,6 +3634,12 @@ export interface OpenOrderResponse { * @memberof OpenOrderResponse */ 'selfTradePreventionType': SelfTradePreventionType; + /** + * + * @type {OrderTwapConfig} + * @memberof OpenOrderResponse + */ + 'twapConfig'?: OrderTwapConfig; /** * The timestamp in millis when the order was opened * @type {number} @@ -3920,6 +3907,25 @@ export const OrderTimeInForce = { export type OrderTimeInForce = typeof OrderTimeInForce[keyof typeof OrderTimeInForce]; +/** + * Configuration for Time-Weighted Average Price orders + * @export + * @interface OrderTwapConfig + */ +export interface OrderTwapConfig { + /** + * Number of sub-orders to split the total quantity into + * @type {string} + * @memberof OrderTwapConfig + */ + 'subOrdersCount'?: string; + /** + * Total time in minutes over which to execute the TWAP order + * @type {string} + * @memberof OrderTwapConfig + */ + 'runningTimeInMinutes'?: string; +} /** * The type of order. (BANKRUPTCY_LIQUIDATION is deprecated) * @export diff --git a/ts/sdk/src/docs/CreateOrderRequest.md b/ts/sdk/src/docs/CreateOrderRequest.md index a16d641..71f3746 100644 --- a/ts/sdk/src/docs/CreateOrderRequest.md +++ b/ts/sdk/src/docs/CreateOrderRequest.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **timeInForce** | [**OrderTimeInForce**](OrderTimeInForce.md) | Omit or set to null for market orders; otherwise, choose a valid time-in-force value. GTT: Good Til Time IOC: Immediate Or Cancel FOK: Fill Or Kill | [optional] [default to undefined] **triggerPriceE9** | **string** | Trigger price in base e9 for stop orders. This should always be a number | [optional] [default to undefined] **selfTradePreventionType** | [**SelfTradePreventionType**](SelfTradePreventionType.md) | | [optional] [default to undefined] -**twapConfig** | [**CreateOrderRequestTwapConfig**](CreateOrderRequestTwapConfig.md) | | [optional] [default to undefined] +**twapConfig** | [**OrderTwapConfig**](OrderTwapConfig.md) | | [optional] [default to undefined] ## Example diff --git a/ts/sdk/src/docs/OpenOrderResponse.md b/ts/sdk/src/docs/OpenOrderResponse.md index 8d2be6d..38b3a96 100644 --- a/ts/sdk/src/docs/OpenOrderResponse.md +++ b/ts/sdk/src/docs/OpenOrderResponse.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **filledQuantityE9** | **string** | The quantity in base e9 of the asset currently filled. This should always be a number | [default to undefined] **status** | [**OrderStatus**](OrderStatus.md) | | [default to undefined] **selfTradePreventionType** | [**SelfTradePreventionType**](SelfTradePreventionType.md) | | [default to undefined] +**twapConfig** | [**OrderTwapConfig**](OrderTwapConfig.md) | | [optional] [default to undefined] **orderTimeAtMillis** | **number** | The timestamp in millis when the order was opened | [default to undefined] **updatedAtMillis** | **number** | The timestamp in millis that this order was last updated (including status updates) | [default to undefined] @@ -56,6 +57,7 @@ const instance: OpenOrderResponse = { filledQuantityE9, status, selfTradePreventionType, + twapConfig, orderTimeAtMillis, updatedAtMillis, }; diff --git a/ts/sdk/src/docs/CreateOrderRequestTwapConfig.md b/ts/sdk/src/docs/OrderTwapConfig.md similarity index 81% rename from ts/sdk/src/docs/CreateOrderRequestTwapConfig.md rename to ts/sdk/src/docs/OrderTwapConfig.md index dc14510..7fd3e42 100644 --- a/ts/sdk/src/docs/CreateOrderRequestTwapConfig.md +++ b/ts/sdk/src/docs/OrderTwapConfig.md @@ -1,4 +1,4 @@ -# CreateOrderRequestTwapConfig +# OrderTwapConfig Configuration for Time-Weighted Average Price orders @@ -12,9 +12,9 @@ Name | Type | Description | Notes ## Example ```typescript -import { CreateOrderRequestTwapConfig } from '@bluefin/api-client'; +import { OrderTwapConfig } from '@bluefin/api-client'; -const instance: CreateOrderRequestTwapConfig = { +const instance: OrderTwapConfig = { subOrdersCount, runningTimeInMinutes, }; diff --git a/ts/sdk/src/sdk.ts b/ts/sdk/src/sdk.ts index 5bf4159..7ac71b9 100644 --- a/ts/sdk/src/sdk.ts +++ b/ts/sdk/src/sdk.ts @@ -8,7 +8,7 @@ import { AccountPositionLeverageUpdateRequestSignedFields, CreateOrderRequestSignedFields, CreateOrderRequest, - CreateOrderRequestTwapConfig, + OrderTwapConfig, AccountDataApi, AuthApi, ExchangeApi, @@ -93,7 +93,7 @@ export interface OrderParams { timeInForce?: OrderTimeInForce; triggerPriceE9?: string; selfTradePreventionType?: SelfTradePreventionType; - twapConfig?: CreateOrderRequestTwapConfig; + twapConfig?: OrderTwapConfig; signerAddress?: string; }