Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions resources/trade-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,24 +203,27 @@ 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
- signature
- 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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ts/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
"prepare": "npm run build"
},
"types": "./dist/types/index.d.ts",
"version": "1.8.2"
"version": "1.8.3"
}
2 changes: 1 addition & 1 deletion ts/sdk/src/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 27 additions & 21 deletions ts/sdk/src/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ts/sdk/src/docs/CreateOrderRequest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ts/sdk/src/docs/OpenOrderResponse.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ts/sdk/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
AccountPositionLeverageUpdateRequestSignedFields,
CreateOrderRequestSignedFields,
CreateOrderRequest,
CreateOrderRequestTwapConfig,
OrderTwapConfig,
AccountDataApi,
AuthApi,
ExchangeApi,
Expand Down Expand Up @@ -93,7 +93,7 @@ export interface OrderParams {
timeInForce?: OrderTimeInForce;
triggerPriceE9?: string;
selfTradePreventionType?: SelfTradePreventionType;
twapConfig?: CreateOrderRequestTwapConfig;
twapConfig?: OrderTwapConfig;
signerAddress?: string;
}

Expand Down