秋田预测市场 · Discord 审计

Kalshi API中time_in_force与expiration_time组合使用导致订单创建静默失败

2026-07-07 · Kalshi · 13 条相关讨论

Eileen 2026-07-07 02:40:55

Is anybody having issue with time_in_force + expiration_time combination? I am sending REST request according to the documentation but it is silently failing behind the scenes

Is anybody having issue with time_in_force + expiration_time combination? I am sending REST request according to the documentation but it is silently failing behind the scenes

Arbgame 2026-07-07 02:41:49

Why would you send both?

Why would you send both?

Eileen 2026-07-07 02:42:32

The document says: To place an expiring order, set time_in_force to good_till_canceled and provide this expiration_time.

The document says: To place an expiring order, set time_in_force to good_till_canceled and provide this expiration_time.

Arbgame 2026-07-07 02:47:55

Ah I forgot that changed. Does it go through if you remove the expiration time and leave everything else the same?

Ah I forgot that changed. Does it go through if you remove the expiration time and leave everything else the same?

Eileen 2026-07-07 02:48:54

The request goes through with expiration_time set, it is just not picked up Kalshi

The request goes through with expiration_time set, it is just not picked up Kalshi

Eileen 2026-07-07 02:49:34

i.e., the order is a true good-til-cancel order

i.e., the order is a true good-til-cancel order

Arbgame 2026-07-07 02:50:00

Does it reject it if you omit time_in_force?

Does it reject it if you omit time_in_force?

Eileen 2026-07-07 02:52:07

It should as time_in_force is a required field. To create a good-til-cancel order with expiration time from Kalshi webpage, I need to select Custom as time_in_force though. Custom is not listed as a valid API value so I am wondering there might be a bug.

It should as time_in_force is a required field. To create a good-til-cancel order with expiration time from Kalshi webpage, I need to select Custom as time_in_force though. Custom is not listed as a valid API value so I am wondering there might be a bug.

Arbgame 2026-07-07 02:55:09

Worth a try omitting it.

Worth a try omitting it.

Eileen 2026-07-07 03:01:59

OK it does reject the request without time_in_force field: Error: 400 - {"error":{"code":"missing_parameters","message":"missing parameters","details":"Key: 'CreateOrderV2Request.TimeInForce' Error:Field validation for 'TimeInForce' failed on the 'required' tag"}}

OK it does reject the request without time_in_force field: Error: 400 - {"error":{"code":"missing_parameters","message":"missing parameters","details":"Key: 'CreateOrderV2Request.TimeInForce' Error:Field validation for 'TimeInForce' failed on the 'required' tag"}}

Eileen 2026-07-07 03:06:32

Strange, tried again just now using same code and it works now

Strange, tried again just now using same code and it works now

Arbgame 2026-07-07 03:06:56

Hadn't used expiration time before but just tested and yeah works for me too

Hadn't used expiration time before but just tested and yeah works for me too

Eileen 2026-07-07 03:09:42

Thanks a lot for the help, really appreciate it

Thanks a lot for the help, really appreciate it