秋田预测市场 · Discord 审计

API V2中No订单提交方式引发混淆

2026-06-26 · Kalshi · 39 条相关讨论

VOXindie 2026-06-26 06:20:00

Most of my no orders are failing. My yes orders are fine. What should a "no" buy look like? Side = ask Price = ?? I was setting my price equiv to the "no ask", but I'm thinking I got it flipped around. ``` => OrderTrackingBackgroundService BuyNo order for KXBTCD-26JUN2519-T59899.99 Canceled. $0.0000/$3.3300 0.0000/5.0000. ```

Most of my no orders are failing. My yes orders are fine. What should a "no" buy look like? Side = ask Price = ?? I was setting my price equiv to the "no ask", but I'm thinking I got it flipped around. ``` => OrderTrackingBackgroundService BuyNo order for KXBTCD-26JUN2519-T59899.99 Canceled. $0.0000/$3.3300 0.0000/5.0000. ```

james 2026-06-26 06:21:03

price for yes and no is the same

price for yes and no is the same

james 2026-06-26 06:21:07

theres only one price

theres only one price

james 2026-06-26 06:21:40

you're just submitting bids and asks

you're just submitting bids and asks

VOXindie 2026-06-26 06:22:01

yeah, I'm submitting `side=ask` for "no buys", but none of them are filling

yeah, I'm submitting `side=ask` for "no buys", but none of them are filling

james 2026-06-26 06:22:25

the price is the "yes price" at which you want to sell

the price is the "yes price" at which you want to sell

VOXindie 2026-06-26 06:23:48

So buying a "no" should be equiv to `1m - yesBid.PriceDollars` correct? with `side=ask` assuming I'm buying top of the order book

So buying a "no" should be equiv to `1m - yesBid.PriceDollars` correct? with `side=ask` assuming I'm buying top of the order book

@bernardbulletin 2026-06-26 06:25:03

theres a site we can do this

theres a site we can do this

Marcoase 2026-06-26 06:25:08

No one knows what yesBid.PriceDollars is

No one knows what yesBid.PriceDollars is

Marcoase 2026-06-26 06:25:38

and I don't know what "1m" is but maybe that's a thing in whatever language you're using

and I don't know what "1m" is but maybe that's a thing in whatever language you're using

VOXindie 2026-06-26 06:26:11

yes bid 1m is just $1

yes bid 1m is just $1

Marcoase 2026-06-26 06:26:16

If you ask a question, refer to the actual parameters you want to send the API for the best chance at someone helping you. Don't use your internal code representtation.

If you ask a question, refer to the actual parameters you want to send the API for the best chance at someone helping you. Don't use your internal code representtation.

VOXindie 2026-06-26 06:26:52

I'm asking about what should be sent to the API.

I'm asking about what should be sent to the API.

Arbgame 2026-06-26 06:27:04

If you're wanting to trade with that 9c order then the price is 9 cents

If you're wanting to trade with that 9c order then the price is 9 cents

VOXindie 2026-06-26 06:27:28

So if I wanted to buy the no side, I'd put in an ask for 9? or 91?

So if I wanted to buy the no side, I'd put in an ask for 9? or 91?

Marcoase 2026-06-26 06:34:11

I think a lot of people get confused about selling something they don't have and being required to do something that looks like buying since they have an outflow of money when they do it. The way to think about selling, when you have no existing position, is that you are creating (writing) the contract for the event, selling the other side of that contract (the "yes side") for Xc and then providing collateral to the exchange for 1 - Xc and the exchange holds on to the Xc from the buyer to fully collateralize the contract. That collateral provision is why it looks like, for all intents and purposes, a "buy". The result of this would be your collateral is on the hook to pay out the buyer if the contract resolves as yes. If it resolves as no, you get the full collateral back at resolution.

I think a lot of people get confused about selling something they don't have and being required to do something that looks like buying since they have an outflow of money when they do it. The way to think about selling, when you have no existing position, is that you are creating (writing) the contract for the event, selling the other side of that contract (the "yes side") for Xc and then providing collateral to the exchange for 1 - Xc and the exchange holds on to the Xc from the buyer to fully collateralize the contract. That collateral provision is why it looks like, for all intents and purposes, a "buy". The result of this would be your collateral is on the hook to pay out the buyer if the contract resolves as yes. If it resolves as no, you get the full collateral back at resolution.

VOXindie 2026-06-26 06:34:30

It's confusing because the API sends no prices lol ``` { "type": "orderbook_snapshot", "sid": 2, "seq": 2, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "yes_dollars_fp": [ [ "0.0800", "300.00" ], [ "0.2200", "333.00" ] ], "no_dollars_fp": [ [ "0.5400", "20.00" ], [ "0.5600", "146.00" ] ] } } ```

It's confusing because the API sends no prices lol ``` { "type": "orderbook_snapshot", "sid": 2, "seq": 2, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "yes_dollars_fp": [ [ "0.0800", "300.00" ], [ "0.2200", "333.00" ] ], "no_dollars_fp": [ [ "0.5400", "20.00" ], [ "0.5600", "146.00" ] ] } } ```

VOXindie 2026-06-26 06:35:53

I'm screwing up something with the no side after switching to V2 order API. Gotta figure out where.

I'm screwing up something with the no side after switching to V2 order API. Gotta figure out where.

james 2026-06-26 06:36:31

there's a flag you can use to get everything in terms of yes

there's a flag you can use to get everything in terms of yes