Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRCL-3205 MARKET order can be either IOC or FOK #75

Merged
merged 1 commit into from
Nov 10, 2023
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
9 changes: 7 additions & 2 deletions v4-client-js/__native__/__ios__/v4-native-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -197882,7 +197882,12 @@ exports.calculateSide = calculateSide;
function calculateTimeInForce(type, timeInForce, execution, postOnly) {
switch (type) {
case constants_1.OrderType.MARKET:
return proto_includes_1.Order_TimeInForce.TIME_IN_FORCE_IOC;
switch (timeInForce) {
case constants_1.OrderTimeInForce.IOC:
return proto_includes_1.Order_TimeInForce.TIME_IN_FORCE_IOC;
default:
return proto_includes_1.Order_TimeInForce.TIME_IN_FORCE_FILL_OR_KILL;
}
case constants_1.OrderType.LIMIT:
switch (timeInForce) {
case constants_1.OrderTimeInForce.GTT:
Expand Down Expand Up @@ -198008,7 +198013,7 @@ function calculateConditionalOrderTriggerSubticks(orderType, atomicResolution, q
}
}
exports.calculateConditionalOrderTriggerSubticks = calculateConditionalOrderTriggerSubticks;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW4taGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jbGllbnRzL2hlbHBlcnMvY2hhaW4taGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxnREFBd0I7QUFFeEIsNENBRXNCO0FBQ3RCLDhEQUErRjtBQUMvRixvQ0FBc0M7QUFFdEMsU0FBZ0IsS0FBSyxDQUFDLE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CLHdDQUF3QyxDQUN0RCxTQUFvQixFQUNwQixnQkFBd0IsRUFDeEIseUJBQWlDLEVBQ2pDLGVBQXVCLEVBQ3ZCLFlBQXFCO0lBRXJCLFFBQVEsU0FBUyxFQUFFO1FBQ2pCLEtBQUsscUJBQVMsQ0FBQyxLQUFLLENBQUM7UUFDckIsS0FBSyxxQkFBUyxDQUFDLE1BQU07WUFDbkIsT0FBTyxjQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRTVCLEtBQUsscUJBQVMsQ0FBQyxVQUFVLENBQUM7UUFDMUIsS0FBSyxxQkFBUyxDQUFDLFdBQVcsQ0FBQztRQUMzQixLQUFLLHFCQUFTLENBQUMsaUJBQWlCLENBQUM7UUFDakMsS0FBSyxxQkFBUyxDQUFDLGtCQUFrQjtZQUMvQixJQUFJLFlBQVksS0FBSyxTQUFTLEVBQUU7Z0JBQzlCLE1BQU0sSUFBSSxLQUFLLENBQUMsNEdBQTRHLENBQUMsQ0FBQzthQUMvSDtZQUNELE9BQU8saUJBQWlCLENBQ3RCLFlBQVksRUFDWixnQkFBZ0IsRUFDaEIseUJBQXlCLEVBQ3pCLGVBQWUsQ0FDaEIsQ0FBQztRQUVKO1lBQ0UsT0FBTyxjQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQzdCO0FBQ0gsQ0FBQztBQTdCRCw0RkE2QkMifQ==

/***/ }),

Expand Down
2 changes: 1 addition & 1 deletion v4-client-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dydxprotocol/v4-client-js",
"version": "1.0.3",
"version": "1.0.4",
"description": "General client library for the new dYdX system (v4 decentralized)",
"main": "build/src/index.js",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion v4-client-js/src/clients/helpers/chain-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ export function calculateTimeInForce(
): Order_TimeInForce {
switch (type) {
case OrderType.MARKET:
return Order_TimeInForce.TIME_IN_FORCE_IOC;
switch (timeInForce) {
case OrderTimeInForce.IOC:
return Order_TimeInForce.TIME_IN_FORCE_IOC;

default:
return Order_TimeInForce.TIME_IN_FORCE_FILL_OR_KILL;
}

case OrderType.LIMIT:
switch (timeInForce) {
Expand Down