@dimes-dot-fi/sdk 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/{aliases-lNsFUKPA.d.cts → aliases-BI1c3Yt0.d.cts} +887 -830
- package/dist/{aliases-lNsFUKPA.d.ts → aliases-BI1c3Yt0.d.ts} +887 -830
- package/dist/contract/index.cjs +880 -19
- package/dist/contract/index.cjs.map +1 -1
- package/dist/contract/index.d.cts +80 -14
- package/dist/contract/index.d.ts +80 -14
- package/dist/contract/index.mjs +879 -18
- package/dist/contract/index.mjs.map +1 -1
- package/dist/{dimes-client-BUAeOsgL.d.cts → dimes-client-C4SsCNrZ.d.cts} +1 -1
- package/dist/{dimes-client-DDF-f8yA.d.ts → dimes-client-Ckn8yRG6.d.ts} +1 -1
- package/dist/{dimes-error-I7lEZ2V5.d.cts → dimes-error-BRysMNV_.d.cts} +2 -2
- package/dist/{dimes-error-CkcjExUy.d.ts → dimes-error-Ke7yuX1m.d.ts} +2 -2
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/{quote-Z88cryAN.d.ts → quote-06n723we.d.ts} +2 -2
- package/dist/{quote-B_cMLw7P.d.cts → quote-CcIqLwKb.d.cts} +2 -2
- package/dist/react/index.d.cts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/{types-F2rHf2Qv.d.cts → types-B881zrxm.d.cts} +1 -1
- package/dist/{types-BvZf3uFL.d.ts → types-CcoiGMbT.d.ts} +1 -1
- package/dist/ws/index.d.cts +3 -3
- package/dist/ws/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -43,1248 +43,1292 @@ interface components {
|
|
|
43
43
|
*/
|
|
44
44
|
polygon_vault_contract_address: string;
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Upper leverage bound (inclusive) in basis points for this tier. The last tier is the catch-all.
|
|
49
|
-
* @example 40000
|
|
50
|
-
*/
|
|
51
|
-
max_leverage_bps: number;
|
|
52
|
-
/**
|
|
53
|
-
* @description Protocol origination fee in basis points applied at or below this tier's leverage bound.
|
|
54
|
-
* @example 200
|
|
55
|
-
*/
|
|
56
|
-
fee_bps: number;
|
|
57
|
-
};
|
|
58
|
-
CustomerFeeRatesMarket: {
|
|
59
|
-
/**
|
|
60
|
-
* @description Market ticker
|
|
61
|
-
* @example TRUMP-2024-WIN
|
|
62
|
-
*/
|
|
63
|
-
ticker: string;
|
|
46
|
+
CustomerPositionEntry: {
|
|
64
47
|
/**
|
|
65
|
-
* @description
|
|
66
|
-
* @example
|
|
48
|
+
* @description Entry collateral actually charged, formatted as USD. On a partial fill the vault refunds the unused share at open, and this is net of that refund.
|
|
49
|
+
* @example 2.50
|
|
67
50
|
*/
|
|
68
|
-
|
|
51
|
+
collateral_usd: string;
|
|
69
52
|
/**
|
|
70
|
-
* @description
|
|
71
|
-
* @example
|
|
53
|
+
* @description Entry collateral actually charged, in USD pips (10000 pips = $1). On a partial fill the vault refunds the unused share at open, and this is net of that refund.
|
|
54
|
+
* @example 25000
|
|
72
55
|
*/
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
CustomerFeeRates: {
|
|
76
|
-
/** @description Per-market venue fee fields. Only present when the request includes a `ticker` query parameter. */
|
|
77
|
-
market?: components["schemas"]["CustomerFeeRatesMarket"];
|
|
78
|
-
/** @description Leverage-tiered protocol origination fee schedule. Resolve a leverage to its fee by picking the first tier whose `maxLeverageBps >= leverageBps` (the last tier is the catch-all). */
|
|
79
|
-
origination_fee_tiers: components["schemas"]["CustomerOriginationFeeTier"][];
|
|
56
|
+
collateral_usd_pips: string;
|
|
80
57
|
/**
|
|
81
|
-
* @description
|
|
82
|
-
* @example
|
|
58
|
+
* @description Entry leverage in basis points (20000 = 2x)
|
|
59
|
+
* @example 20000
|
|
83
60
|
*/
|
|
84
|
-
|
|
61
|
+
leverage_bps: number;
|
|
85
62
|
/**
|
|
86
|
-
* @description
|
|
87
|
-
* @example
|
|
63
|
+
* @description Risk mode the position was opened in. adaptive: the live risk engine manages leverage. committed: the position follows the planned unwinds fixed at quote time.
|
|
64
|
+
* @example adaptive
|
|
65
|
+
* @enum {string}
|
|
88
66
|
*/
|
|
89
|
-
|
|
67
|
+
risk_mode: "adaptive" | "committed";
|
|
90
68
|
/**
|
|
91
|
-
* @description
|
|
92
|
-
* @example
|
|
69
|
+
* @description Extra margin locked in the vault on top of collateral, formatted as USD. Zero on adaptive positions.
|
|
70
|
+
* @example 0.00
|
|
93
71
|
*/
|
|
94
|
-
|
|
72
|
+
locked_margin_usd: string;
|
|
95
73
|
/**
|
|
96
|
-
* @description
|
|
74
|
+
* @description Extra margin locked in the vault on top of collateral, in USDC units (1,000,000 units = 1 USDC). Zero on adaptive positions.
|
|
97
75
|
* @example 0
|
|
98
76
|
*/
|
|
99
|
-
|
|
77
|
+
locked_margin_usdc_units: string;
|
|
100
78
|
/**
|
|
101
|
-
* @description
|
|
102
|
-
* @example
|
|
79
|
+
* @description Entry notional formatted as USD
|
|
80
|
+
* @example 5.00
|
|
103
81
|
*/
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
FeeReportBody: {
|
|
82
|
+
notional_usd: string;
|
|
107
83
|
/**
|
|
108
|
-
* @description
|
|
84
|
+
* @description Entry notional in USD pips
|
|
109
85
|
* @example 50000
|
|
110
86
|
*/
|
|
111
|
-
|
|
87
|
+
notional_usd_pips: string;
|
|
112
88
|
/**
|
|
113
|
-
* @description
|
|
114
|
-
* @example
|
|
89
|
+
* @description Time in milliseconds from position creation to on-chain open confirmation. Null until the position is fully opened on chain.
|
|
90
|
+
* @example 12500
|
|
115
91
|
*/
|
|
116
|
-
|
|
92
|
+
open_latency_ms?: number | null;
|
|
117
93
|
/**
|
|
118
|
-
* @description
|
|
119
|
-
* @example
|
|
94
|
+
* @description ISO 8601 timestamp when position was opened
|
|
95
|
+
* @example 2025-01-15T10:30:00.000Z
|
|
120
96
|
*/
|
|
121
|
-
|
|
97
|
+
opened_at?: string;
|
|
122
98
|
/**
|
|
123
|
-
* @description
|
|
124
|
-
* @
|
|
99
|
+
* @description Combined origination fee in basis points. `protocolOriginationFeeBps + partnerOriginationFeeBps === originationFeeBps`.
|
|
100
|
+
* @example 100
|
|
125
101
|
*/
|
|
126
|
-
|
|
102
|
+
origination_fee_bps: number;
|
|
127
103
|
/**
|
|
128
|
-
* @description
|
|
129
|
-
* @example
|
|
104
|
+
* @description Protocol portion of the origination fee in basis points. `protocolOriginationFeeBps + partnerOriginationFeeBps === originationFeeBps`.
|
|
105
|
+
* @example 80
|
|
130
106
|
*/
|
|
131
|
-
|
|
132
|
-
};
|
|
133
|
-
CustomerFeeReport: {
|
|
107
|
+
protocol_origination_fee_bps: number;
|
|
134
108
|
/**
|
|
135
|
-
* @description
|
|
136
|
-
* @example
|
|
109
|
+
* @description Partner portion of the origination fee in basis points. `protocolOriginationFeeBps + partnerOriginationFeeBps === originationFeeBps`.
|
|
110
|
+
* @example 20
|
|
137
111
|
*/
|
|
138
|
-
|
|
112
|
+
partner_origination_fee_bps: number;
|
|
139
113
|
/**
|
|
140
|
-
* @description
|
|
141
|
-
* @
|
|
114
|
+
* @description Origination fee actually charged, formatted as USD. On a partial fill the vault refunds the unused share of the reserved fee at open, and this is net of that refund.
|
|
115
|
+
* @example 0.05
|
|
142
116
|
*/
|
|
143
|
-
|
|
117
|
+
origination_fee_usd: string;
|
|
144
118
|
/**
|
|
145
|
-
* @description
|
|
146
|
-
* @example
|
|
119
|
+
* @description Origination fee actually charged, in USD pips. On a partial fill this is net of the open-time refund.
|
|
120
|
+
* @example 500
|
|
147
121
|
*/
|
|
148
|
-
|
|
122
|
+
origination_fee_usd_pips: string;
|
|
149
123
|
/**
|
|
150
|
-
* @description Entry price
|
|
151
|
-
* @example
|
|
124
|
+
* @description Entry price formatted as USD
|
|
125
|
+
* @example 0.50
|
|
152
126
|
*/
|
|
153
|
-
|
|
127
|
+
price_usd: string;
|
|
154
128
|
/**
|
|
155
|
-
* @description
|
|
156
|
-
* @example
|
|
129
|
+
* @description Entry price in USD pips
|
|
130
|
+
* @example 5000
|
|
157
131
|
*/
|
|
158
|
-
|
|
132
|
+
price_usd_pips: string;
|
|
159
133
|
/**
|
|
160
|
-
* @description
|
|
161
|
-
* @example
|
|
134
|
+
* @description Effective entry price (actual fill price on the prediction market) formatted as USD, computed as the notional actually spent divided by the tokens actually delivered. On a partial fill this reflects the filled portion only, so it never exceeds $1.00. Null until the fill is recorded on chain.
|
|
135
|
+
* @example 0.5025
|
|
162
136
|
*/
|
|
163
|
-
|
|
137
|
+
effective_entry_price_usd?: string | null;
|
|
164
138
|
/**
|
|
165
|
-
* @description
|
|
166
|
-
* @example
|
|
139
|
+
* @description Effective entry price in USD pips. Null until the fill is recorded on chain.
|
|
140
|
+
* @example 5025
|
|
167
141
|
*/
|
|
168
|
-
|
|
142
|
+
effective_entry_price_usd_pips?: string | null;
|
|
169
143
|
/**
|
|
170
|
-
* @description
|
|
171
|
-
* @example
|
|
144
|
+
* @description Execution slippage between the offer's indicative entry price and the actual fill price, in basis points. Signed: positive means the fill was worse than the quote, negative means the fill was better. Null until the fill is recorded on chain.
|
|
145
|
+
* @example 50
|
|
172
146
|
*/
|
|
173
|
-
|
|
147
|
+
effective_slippage_bps?: number | null;
|
|
174
148
|
/**
|
|
175
|
-
* @description
|
|
176
|
-
* @example
|
|
149
|
+
* @description Original position token units delivered when the position opened (1000000 units = 1 token). Unlike `current.positionTokenUnits` (the live, possibly partially-closed survivor), this is the fixed size credited at open and is the basis for the partial-close minimum. Null until the open fill is recorded on chain.
|
|
150
|
+
* @example 10000000
|
|
177
151
|
*/
|
|
178
|
-
|
|
152
|
+
position_token_units?: string | null;
|
|
179
153
|
/**
|
|
180
|
-
* @description
|
|
181
|
-
* @example
|
|
154
|
+
* @description How much of the requested size was actually filled when the position opened, in basis points (10000 = 100%). Computed as actual open notional / requested notional and FROZEN at open — it does NOT change when the position is partially closed. Use this for an 'opened at X% of requested' badge. Null until the open fill is recorded on chain.
|
|
155
|
+
* @example 9657
|
|
182
156
|
*/
|
|
183
|
-
|
|
157
|
+
initial_fill_bps?: number | null;
|
|
158
|
+
};
|
|
159
|
+
CustomerPositionFailure: {
|
|
184
160
|
/**
|
|
185
|
-
* @description
|
|
186
|
-
* @example
|
|
161
|
+
* @description Failure reason code
|
|
162
|
+
* @example price_exceeded_tolerance
|
|
187
163
|
*/
|
|
188
|
-
|
|
164
|
+
reason: string;
|
|
165
|
+
};
|
|
166
|
+
CustomerPositionUnwind: {
|
|
189
167
|
/**
|
|
190
|
-
* @description
|
|
191
|
-
* @example
|
|
168
|
+
* @description executed: an unwind that landed on-chain, as recorded by the deleveraging itself. planned: a committed-mode rung that fires if the price reaches triggerPriceUsdPips. triggered: a committed-mode rung whose trigger price was reached, stamped with executedAt. superseded: a committed-mode rung that can no longer fire because a partial close already took the position below its target leverage. Rung rows (planned, triggered, superseded) are the signed ladder and are only returned when the request asks for them; they describe what was promised, while executed rows describe what actually happened.
|
|
169
|
+
* @example executed
|
|
170
|
+
* @enum {string}
|
|
192
171
|
*/
|
|
193
|
-
|
|
172
|
+
status: "executed" | "planned" | "superseded" | "triggered";
|
|
194
173
|
/**
|
|
195
|
-
* @description
|
|
196
|
-
* @example
|
|
174
|
+
* @description The market signal that triggered the risk-model inference behind this unwind (e.g. `spread_blowout`, `depth_decay`, `price_drop_severe`). Null for unwinds not tied to an inference run, such as manually triggered deleveraging.
|
|
175
|
+
* @example spread_blowout
|
|
176
|
+
* @enum {string|null}
|
|
197
177
|
*/
|
|
198
|
-
|
|
178
|
+
reason?: "activity_surge" | "cancel_acceleration" | "crypto_move" | "depth_decay" | "depth_drain" | "depth_entry_drain" | "game_start" | "large_holder" | "last_trade_divergence" | "lead_change" | "post_hard_exit_losing" | "position_exposure" | "price_drop_full_exit" | "price_drop_moderate" | "price_drop_severe" | "price_drop_warning" | "spread_blowout" | "spread_spike" | "spread_warning" | "stale_refresh" | "unknown" | null;
|
|
199
179
|
/**
|
|
200
|
-
* @description
|
|
201
|
-
* @example
|
|
180
|
+
* @description Leverage after unwind in basis points (20000 = 2x)
|
|
181
|
+
* @example 30000
|
|
202
182
|
*/
|
|
203
|
-
|
|
183
|
+
after_leverage_bps: number;
|
|
204
184
|
/**
|
|
205
|
-
* @description
|
|
206
|
-
* @example
|
|
185
|
+
* @description Leverage before unwind in basis points (20000 = 2x)
|
|
186
|
+
* @example 60000
|
|
207
187
|
*/
|
|
208
|
-
|
|
188
|
+
before_leverage_bps: number;
|
|
209
189
|
/**
|
|
210
|
-
* @description
|
|
211
|
-
* @example
|
|
190
|
+
* @description ISO 8601 timestamp when the unwind was executed on-chain. Null on planned unwinds, which have not happened yet.
|
|
191
|
+
* @example 2025-06-02T14:30:00.000Z
|
|
212
192
|
*/
|
|
213
|
-
|
|
193
|
+
executed_at?: string | null;
|
|
214
194
|
/**
|
|
215
|
-
* @description
|
|
216
|
-
* @example
|
|
195
|
+
* @description Price at which this planned unwind fires, formatted as USD. Null on executed unwinds.
|
|
196
|
+
* @example 0.42
|
|
217
197
|
*/
|
|
218
|
-
|
|
198
|
+
trigger_price_usd?: string | null;
|
|
219
199
|
/**
|
|
220
|
-
* @description
|
|
221
|
-
* @example
|
|
200
|
+
* @description Price at which this planned unwind fires, in USD pips (10000 pips = $1). Null on executed unwinds.
|
|
201
|
+
* @example 4200
|
|
222
202
|
*/
|
|
223
|
-
|
|
203
|
+
trigger_price_usd_pips?: string | null;
|
|
204
|
+
/**
|
|
205
|
+
* @description Human-readable explanation of `reason` — a customer-facing sentence describing the market condition that triggered this deleverage. Null whenever `reason` is null.
|
|
206
|
+
* @example The bid-ask spread widened sharply beyond its recent baseline, signalling thinning liquidity.
|
|
207
|
+
*/
|
|
208
|
+
reason_detail?: string | null;
|
|
224
209
|
};
|
|
225
|
-
|
|
210
|
+
CustomerPositionUnwindList: {
|
|
211
|
+
data: components["schemas"]["CustomerPositionUnwind"][];
|
|
212
|
+
has_more: boolean;
|
|
213
|
+
total_count?: number;
|
|
226
214
|
/**
|
|
227
|
-
* @description
|
|
228
|
-
* @example
|
|
215
|
+
* @description Current leverage of the position in basis points (20000 = 2x), null if not yet calculated
|
|
216
|
+
* @example 30000
|
|
229
217
|
*/
|
|
230
|
-
|
|
218
|
+
current_leverage_bps: number | null;
|
|
231
219
|
/**
|
|
232
|
-
* @description
|
|
233
|
-
* @example
|
|
220
|
+
* @description ISO 8601 timestamp when the position was opened on-chain (null if not yet opened)
|
|
221
|
+
* @example 2025-06-01T12:00:00.000Z
|
|
234
222
|
*/
|
|
235
|
-
|
|
223
|
+
originated_at: string | null;
|
|
236
224
|
/**
|
|
237
|
-
* @description
|
|
238
|
-
* @example
|
|
225
|
+
* @description Leverage at position origination in basis points (20000 = 2x)
|
|
226
|
+
* @example 60000
|
|
239
227
|
*/
|
|
240
|
-
|
|
228
|
+
origination_leverage_bps: number;
|
|
229
|
+
};
|
|
230
|
+
CustomerCloseAttempt: {
|
|
241
231
|
/**
|
|
242
|
-
* @description
|
|
243
|
-
* @
|
|
232
|
+
* @description Outcome of the close attempt. `deferred` means the close could not complete yet and was postponed.
|
|
233
|
+
* @enum {string}
|
|
244
234
|
*/
|
|
245
|
-
|
|
235
|
+
outcome: "deferred";
|
|
246
236
|
/**
|
|
247
|
-
* @description
|
|
248
|
-
* @
|
|
237
|
+
* @description Why the close was deferred. `awaiting_settlement`: the market resolved before the position could be sold, so the remaining tokens will be redeemed when the market settles rather than sold on the order book.
|
|
238
|
+
* @enum {string}
|
|
249
239
|
*/
|
|
250
|
-
|
|
240
|
+
reason: "awaiting_settlement";
|
|
251
241
|
/**
|
|
252
|
-
* @description
|
|
253
|
-
* @example
|
|
242
|
+
* @description ISO-8601 timestamp of when the close was requested.
|
|
243
|
+
* @example 2026-06-15T17:27:11.736Z
|
|
254
244
|
*/
|
|
255
|
-
|
|
245
|
+
deferred_at: string;
|
|
256
246
|
};
|
|
257
|
-
|
|
247
|
+
CustomerPendingOperation: {
|
|
258
248
|
/**
|
|
259
|
-
* @description
|
|
260
|
-
* @
|
|
249
|
+
* @description The lifecycle operation currently in flight on this position. Present whenever the position is mid-operation (open, close, partial close, unwind, liquidate, or settle); null when the position is at rest. Note `status` stays `open` throughout a `partial_close`, so this is the only signal a slice is in flight after a reload.
|
|
250
|
+
* @enum {string}
|
|
261
251
|
*/
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* @description Maximum leverage in basis points for this tier
|
|
265
|
-
* @example 20000
|
|
266
|
-
*/
|
|
267
|
-
max_leverage_bps: number;
|
|
268
|
-
};
|
|
269
|
-
CustomerFees: {
|
|
252
|
+
type: "open" | "close" | "partial_close" | "unwind" | "liquidate" | "settle";
|
|
270
253
|
/**
|
|
271
|
-
* @description
|
|
272
|
-
* @example
|
|
254
|
+
* @description Sub-state of the operation: `requested` (submitted, not yet executing), `initiated` (executing on the venue), `pending` (tokens withdrawn, finalizing on chain), `awaiting_settlement` (a close deferred until the market settles). Null when the operation has no distinct phase.
|
|
255
|
+
* @example initiated
|
|
256
|
+
* @enum {string|null}
|
|
273
257
|
*/
|
|
274
|
-
|
|
258
|
+
phase?: "requested" | "initiated" | "pending" | "awaiting_settlement" | null;
|
|
275
259
|
/**
|
|
276
|
-
* @description
|
|
277
|
-
* @example
|
|
260
|
+
* @description Token units involved in the in-flight operation (1000000 units = 1 token). For `partial_close` this is the slice being closed; for `close`/`liquidate` the units withdrawn; for the awaiting-settlement close the remaining tokens. Null when the operation carries no specific token amount.
|
|
261
|
+
* @example 5000000
|
|
278
262
|
*/
|
|
279
|
-
|
|
280
|
-
/** @description Origination fee tiers by leverage */
|
|
281
|
-
origination_tiers: components["schemas"]["CustomerOriginationTier"][];
|
|
263
|
+
token_units?: string | null;
|
|
282
264
|
};
|
|
283
|
-
|
|
265
|
+
CustomerPositionCurrent: {
|
|
284
266
|
/**
|
|
285
|
-
* @description
|
|
286
|
-
* @example
|
|
267
|
+
* @description Current book-value leverage in basis points (20000 = 2x)
|
|
268
|
+
* @example 18000
|
|
287
269
|
*/
|
|
288
|
-
|
|
270
|
+
book_leverage_bps: number;
|
|
289
271
|
/**
|
|
290
|
-
* @description
|
|
291
|
-
* @example
|
|
272
|
+
* @description Current collateral formatted as USD
|
|
273
|
+
* @example 2.50
|
|
292
274
|
*/
|
|
293
|
-
|
|
275
|
+
collateral_usd: string;
|
|
294
276
|
/**
|
|
295
|
-
* @description
|
|
296
|
-
* @example
|
|
277
|
+
* @description Current collateral in USD pips
|
|
278
|
+
* @example 25000
|
|
297
279
|
*/
|
|
298
|
-
|
|
280
|
+
collateral_usd_pips: string;
|
|
299
281
|
/**
|
|
300
|
-
* @description
|
|
301
|
-
* @example
|
|
282
|
+
* @description Effective collateral formatted as USD
|
|
283
|
+
* @example 2.45
|
|
302
284
|
*/
|
|
303
|
-
|
|
304
|
-
};
|
|
305
|
-
CustomerSidedMaxMarketLeveragePerNotional: {
|
|
306
|
-
/** @description Per-notional max market leverage for the YES side */
|
|
307
|
-
yes: components["schemas"]["CustomerMaxMarketLeveragePerNotional"];
|
|
308
|
-
/** @description Per-notional max market leverage for the NO side */
|
|
309
|
-
no: components["schemas"]["CustomerMaxMarketLeveragePerNotional"];
|
|
310
|
-
};
|
|
311
|
-
CustomerLeverage: {
|
|
285
|
+
effective_collateral_usd: string;
|
|
312
286
|
/**
|
|
313
|
-
* @
|
|
314
|
-
* @
|
|
315
|
-
* @example 50000
|
|
287
|
+
* @description Effective collateral after fees in USD pips
|
|
288
|
+
* @example 24500
|
|
316
289
|
*/
|
|
317
|
-
|
|
318
|
-
/** @description Max market leverage per side, broken out by position notional. Slippage grows with notional, so larger notionals have lower max leverage. The UI slider should publish the leverage that matches the user's selected notional. */
|
|
319
|
-
max_market_leverage_per_notional: components["schemas"]["CustomerSidedMaxMarketLeveragePerNotional"];
|
|
290
|
+
effective_collateral_usd_pips: string;
|
|
320
291
|
/**
|
|
321
|
-
* @
|
|
322
|
-
* @
|
|
292
|
+
* @deprecated
|
|
293
|
+
* @description Current leverage in basis points
|
|
294
|
+
* @example 18000
|
|
323
295
|
*/
|
|
324
|
-
|
|
296
|
+
leverage_bps: number;
|
|
325
297
|
/**
|
|
326
|
-
* @description
|
|
327
|
-
* @example
|
|
298
|
+
* @description Current market-value leverage in basis points, computed from the live oracle price. Null when the position is insolvent (equity <= 0).
|
|
299
|
+
* @example 19500
|
|
328
300
|
*/
|
|
329
|
-
|
|
301
|
+
market_leverage_bps?: number | null;
|
|
330
302
|
/**
|
|
331
|
-
* @description
|
|
332
|
-
* @example
|
|
303
|
+
* @description Current mark price formatted as USD
|
|
304
|
+
* @example 0.55
|
|
333
305
|
*/
|
|
334
|
-
|
|
306
|
+
mark_price_usd: string;
|
|
335
307
|
/**
|
|
336
|
-
* @description
|
|
337
|
-
* @example
|
|
308
|
+
* @description Current mark price in USD pips
|
|
309
|
+
* @example 5500
|
|
338
310
|
*/
|
|
339
|
-
|
|
340
|
-
};
|
|
341
|
-
CustomerMarketPolymarket: {
|
|
311
|
+
mark_price_usd_pips: string;
|
|
342
312
|
/**
|
|
343
|
-
* @description
|
|
344
|
-
* @example
|
|
313
|
+
* @description Unrealized PnL net of all fees (origination + pending lifetime + accrued venue) as return on equity in basis points
|
|
314
|
+
* @example 1800
|
|
345
315
|
*/
|
|
346
|
-
|
|
316
|
+
net_unrealized_pnl_bps: number;
|
|
347
317
|
/**
|
|
348
|
-
* @description
|
|
349
|
-
* @example
|
|
318
|
+
* @description Unrealized PnL net of all fees (origination + pending lifetime + accrued venue) formatted as USD
|
|
319
|
+
* @example 0.45
|
|
350
320
|
*/
|
|
351
|
-
|
|
321
|
+
net_unrealized_pnl_usd: string;
|
|
352
322
|
/**
|
|
353
|
-
* @description
|
|
354
|
-
* @example
|
|
323
|
+
* @description Unrealized PnL net of all fees (origination + pending lifetime + accrued venue) in USD pips (can be negative)
|
|
324
|
+
* @example 4500
|
|
355
325
|
*/
|
|
356
|
-
|
|
326
|
+
net_unrealized_pnl_usd_pips: string;
|
|
357
327
|
/**
|
|
358
|
-
* @description
|
|
359
|
-
* @example
|
|
328
|
+
* @description Current notional formatted as USD
|
|
329
|
+
* @example 5.50
|
|
360
330
|
*/
|
|
361
|
-
|
|
362
|
-
};
|
|
363
|
-
CustomerSideEligibility: {
|
|
331
|
+
notional_usd: string;
|
|
364
332
|
/**
|
|
365
|
-
* @description
|
|
366
|
-
* @example
|
|
333
|
+
* @description Current notional in USD pips
|
|
334
|
+
* @example 55000
|
|
367
335
|
*/
|
|
368
|
-
|
|
336
|
+
notional_usd_pips: string;
|
|
369
337
|
/**
|
|
370
|
-
* @description
|
|
371
|
-
* @example
|
|
338
|
+
* @description Smallest partial-close slice the contract will accept right now, in token units (1000000 units = 1 token): `max(5 tokens, 20% of the original opened size)`. Null when the position is not partial-closeable (an operation is already in flight, the open fill isn't recorded yet, or the survivor is below the minimum).
|
|
339
|
+
* @example 5000000
|
|
372
340
|
*/
|
|
373
|
-
|
|
374
|
-
};
|
|
375
|
-
CustomerSidedEligibility: {
|
|
376
|
-
/** @description Eligibility for the YES side */
|
|
377
|
-
yes: components["schemas"]["CustomerSideEligibility"];
|
|
378
|
-
/** @description Eligibility for the NO side */
|
|
379
|
-
no: components["schemas"]["CustomerSideEligibility"];
|
|
380
|
-
};
|
|
381
|
-
CustomerMarketPrices: {
|
|
341
|
+
min_partial_close_token_units?: string | null;
|
|
382
342
|
/**
|
|
383
|
-
* @description
|
|
384
|
-
* @example
|
|
343
|
+
* @description Largest partial-close slice allowed right now, in token units (1000000 units = 1 token). Two bounds apply and this is the tighter of them: a position may partial-close at most 80% of its original opened size in total over its life (past that only a full close remains), and no single slice may drop the survivor's collateral below the on-chain minimum. Null when the position is not partial-closeable.
|
|
344
|
+
* @example 10000000
|
|
385
345
|
*/
|
|
386
|
-
|
|
346
|
+
max_partial_close_token_units?: string | null;
|
|
387
347
|
/**
|
|
388
|
-
* @description
|
|
389
|
-
* @example
|
|
348
|
+
* @description Position token units held (1000000 units = 1 token)
|
|
349
|
+
* @example 10000000
|
|
390
350
|
*/
|
|
391
|
-
|
|
351
|
+
position_token_units: string;
|
|
392
352
|
/**
|
|
393
|
-
* @description
|
|
394
|
-
* @example
|
|
353
|
+
* @description Fraction of the originally opened size still held, in basis points (10000 = 100%). Computed as current token units / original opened token units. This LEGITIMATELY DECREASES after each partial close (e.g. 7000 = 70% remaining after a 30% close) and is not a fill problem. Null until the open fill is recorded on chain.
|
|
354
|
+
* @example 7000
|
|
395
355
|
*/
|
|
396
|
-
|
|
356
|
+
remaining_bps?: number | null;
|
|
397
357
|
/**
|
|
398
|
-
* @description
|
|
399
|
-
* @example
|
|
358
|
+
* @description Total position value formatted as USD
|
|
359
|
+
* @example 3.00
|
|
400
360
|
*/
|
|
401
|
-
|
|
361
|
+
position_value_usd: string;
|
|
402
362
|
/**
|
|
403
|
-
* @description
|
|
404
|
-
* @example
|
|
363
|
+
* @description Total position value in USD pips
|
|
364
|
+
* @example 30000
|
|
405
365
|
*/
|
|
406
|
-
|
|
366
|
+
position_value_usd_pips: string;
|
|
407
367
|
/**
|
|
408
|
-
* @description
|
|
409
|
-
* @example
|
|
368
|
+
* @description Unrealized PnL as return on equity in basis points (1000 = 10%)
|
|
369
|
+
* @example 2000
|
|
410
370
|
*/
|
|
411
|
-
|
|
371
|
+
unrealized_pnl_bps: number;
|
|
412
372
|
/**
|
|
413
|
-
* @description
|
|
414
|
-
* @example 0.
|
|
373
|
+
* @description Unrealized PnL formatted as USD
|
|
374
|
+
* @example 0.50
|
|
415
375
|
*/
|
|
416
|
-
|
|
376
|
+
unrealized_pnl_usd: string;
|
|
417
377
|
/**
|
|
418
|
-
* @description
|
|
419
|
-
* @example
|
|
378
|
+
* @description Unrealized PnL in USD pips (can be negative)
|
|
379
|
+
* @example 5000
|
|
420
380
|
*/
|
|
421
|
-
|
|
381
|
+
unrealized_pnl_usd_pips: string;
|
|
422
382
|
};
|
|
423
|
-
|
|
383
|
+
CustomerPositionOpenFees: {
|
|
424
384
|
/**
|
|
425
|
-
* @description
|
|
426
|
-
* @example
|
|
385
|
+
* @description Accrued lifetime fee formatted as USD
|
|
386
|
+
* @example 0.01
|
|
427
387
|
*/
|
|
428
|
-
|
|
429
|
-
/** @description Fee configuration */
|
|
430
|
-
fees: components["schemas"]["CustomerFees"];
|
|
388
|
+
accrued_lifetime_fee_usd: string;
|
|
431
389
|
/**
|
|
432
|
-
* @description
|
|
433
|
-
* @example
|
|
390
|
+
* @description Accrued lifetime fee in USD pips
|
|
391
|
+
* @example 100
|
|
434
392
|
*/
|
|
435
|
-
|
|
436
|
-
/** @description Leverage configuration */
|
|
437
|
-
leverage: components["schemas"]["CustomerLeverage"];
|
|
393
|
+
accrued_lifetime_fee_usd_pips: string;
|
|
438
394
|
/**
|
|
439
|
-
* @description
|
|
440
|
-
* @
|
|
395
|
+
* @description Venue (Polymarket) trading fees paid so far on this position, summed across open and any force-unwind exchange transactions, formatted as USD.
|
|
396
|
+
* @example 0.02
|
|
441
397
|
*/
|
|
442
|
-
|
|
398
|
+
accrued_venue_fee_usd: string;
|
|
443
399
|
/**
|
|
444
|
-
* @description
|
|
445
|
-
* @
|
|
400
|
+
* @description Venue trading fees paid so far on this position in USD pips.
|
|
401
|
+
* @example 200
|
|
446
402
|
*/
|
|
447
|
-
|
|
403
|
+
accrued_venue_fee_usd_pips: string;
|
|
448
404
|
/**
|
|
449
|
-
* @description
|
|
450
|
-
* @example
|
|
451
|
-
* "politics",
|
|
452
|
-
* "election"
|
|
453
|
-
* ]
|
|
405
|
+
* @description Lifetime fee APR in basis points
|
|
406
|
+
* @example 500
|
|
454
407
|
*/
|
|
455
|
-
|
|
456
|
-
/** @description Polymarket identifiers for this market, for mapping our markets onto Polymarket data feeds. Always present (all live markets are Polymarket-sourced). */
|
|
457
|
-
polymarket: components["schemas"]["CustomerMarketPolymarket"];
|
|
408
|
+
lifetime_apr_bps: number;
|
|
458
409
|
/**
|
|
459
|
-
* @
|
|
460
|
-
* @
|
|
461
|
-
* @example will-trump-win-the-2024-election
|
|
410
|
+
* @description Pending lifetime fee formatted as USD
|
|
411
|
+
* @example 0.005
|
|
462
412
|
*/
|
|
463
|
-
|
|
464
|
-
/** @description Market title */
|
|
465
|
-
title?: string;
|
|
466
|
-
/** @description Latest bid/ask prices for YES and NO sides. Only present when the request includes `expand=prices`. */
|
|
467
|
-
prices?: components["schemas"]["CustomerMarketPrices"] | null;
|
|
413
|
+
pending_lifetime_fee_usd: string;
|
|
468
414
|
/**
|
|
469
|
-
* @description
|
|
470
|
-
* @example
|
|
415
|
+
* @description Pending lifetime fee in USD pips
|
|
416
|
+
* @example 50
|
|
471
417
|
*/
|
|
472
|
-
|
|
418
|
+
pending_lifetime_fee_usd_pips: string;
|
|
473
419
|
/**
|
|
474
|
-
* @description
|
|
475
|
-
* @example
|
|
420
|
+
* @description Sum of all fees accrued or owed so far (origination + accrued lifetime + pending lifetime + accrued venue), formatted as USD. Mirrors closed positions' `fees.totalFeesUsd`.
|
|
421
|
+
* @example 0.085
|
|
476
422
|
*/
|
|
477
|
-
|
|
423
|
+
total_fees_usd: string;
|
|
478
424
|
/**
|
|
479
|
-
* @description
|
|
480
|
-
* @example
|
|
425
|
+
* @description Sum of all fees accrued or owed so far (origination + accrued lifetime + pending lifetime + accrued venue) in USD pips.
|
|
426
|
+
* @example 850
|
|
481
427
|
*/
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
* @example 2025-01-20T11:30:00.000Z
|
|
486
|
-
*/
|
|
487
|
-
latest_enter_at?: string;
|
|
488
|
-
/**
|
|
489
|
-
* @description Minimum collateral amount formatted as USD
|
|
490
|
-
* @example 0.02
|
|
491
|
-
*/
|
|
492
|
-
min_collateral_usd: string;
|
|
493
|
-
/**
|
|
494
|
-
* @description Minimum collateral amount in USD pips (10000 pips = $1)
|
|
495
|
-
* @example 200000
|
|
496
|
-
*/
|
|
497
|
-
min_collateral_usd_pips: string;
|
|
498
|
-
/**
|
|
499
|
-
* @description Minimum notional amount formatted as USD
|
|
500
|
-
* @example 5.00
|
|
501
|
-
*/
|
|
502
|
-
min_notional_usd: string;
|
|
503
|
-
/**
|
|
504
|
-
* @description Minimum notional amount in USD pips (10000 pips = $1)
|
|
505
|
-
* @example 50000
|
|
506
|
-
*/
|
|
507
|
-
min_notional_usd_pips: string;
|
|
508
|
-
/**
|
|
509
|
-
* @description Where this market sits on the road to settlement. `none` — still trading, nothing pending. `awaiting_resolution` — the market has closed and the outcome is decided, but the prediction market provider has not yet published the result on chain, so nothing can be redeemed yet. `settling` — the result is published and open positions are being settled. `voided` — the market was voided and every token pays out at $0.50. `unresolved_upstream` — the market disappeared from the provider before publishing a result and may never resolve.
|
|
510
|
-
* @example none
|
|
511
|
-
* @enum {string}
|
|
512
|
-
*/
|
|
513
|
-
settlement_state: "awaiting_resolution" | "none" | "settling" | "unresolved_upstream" | "voided";
|
|
514
|
-
/**
|
|
515
|
-
* @description Capacity-limited maximum notional for NO side formatted as USD
|
|
516
|
-
* @example 50.00
|
|
517
|
-
*/
|
|
518
|
-
capacity_max_notional_no_usd?: string | null;
|
|
428
|
+
total_fees_usd_pips: string;
|
|
429
|
+
};
|
|
430
|
+
CustomerPositionRisk: {
|
|
519
431
|
/**
|
|
520
|
-
* @description
|
|
521
|
-
* @example
|
|
432
|
+
* @description Current liquidation price formatted as USD
|
|
433
|
+
* @example 0.35
|
|
522
434
|
*/
|
|
523
|
-
|
|
435
|
+
current_liquidation_price_usd: string;
|
|
524
436
|
/**
|
|
525
|
-
* @description
|
|
526
|
-
* @example
|
|
437
|
+
* @description Current liquidation price in USD pips
|
|
438
|
+
* @example 3500
|
|
527
439
|
*/
|
|
528
|
-
|
|
440
|
+
current_liquidation_price_usd_pips: string;
|
|
529
441
|
/**
|
|
530
|
-
* @description
|
|
531
|
-
* @example
|
|
442
|
+
* @description Margin health 0-10000 (10000 at entry, 0 at liquidation)
|
|
443
|
+
* @example 7500
|
|
532
444
|
*/
|
|
533
|
-
|
|
445
|
+
health_bps: number;
|
|
534
446
|
/**
|
|
535
|
-
* @description
|
|
536
|
-
* @example
|
|
447
|
+
* @description Buffer to liquidation in basis points
|
|
448
|
+
* @example 500
|
|
537
449
|
*/
|
|
538
|
-
|
|
450
|
+
liquidation_buffer_bps: number;
|
|
539
451
|
/**
|
|
540
|
-
* @description
|
|
541
|
-
* @example
|
|
452
|
+
* @description Liquidation fee in basis points
|
|
453
|
+
* @example 200
|
|
542
454
|
*/
|
|
543
|
-
|
|
455
|
+
liquidation_fee_bps: number;
|
|
544
456
|
/**
|
|
545
|
-
* @description
|
|
546
|
-
* @example 50
|
|
457
|
+
* @description Dollar distance to liquidation formatted as USD
|
|
458
|
+
* @example 0.50
|
|
547
459
|
*/
|
|
548
|
-
|
|
460
|
+
margin_buffer_usd: string;
|
|
549
461
|
/**
|
|
550
|
-
* @description
|
|
551
|
-
* @example
|
|
462
|
+
* @description Dollar distance to liquidation in USD pips
|
|
463
|
+
* @example 5000
|
|
552
464
|
*/
|
|
553
|
-
|
|
465
|
+
margin_buffer_usd_pips: string;
|
|
466
|
+
};
|
|
467
|
+
CustomerPositionTiming: {
|
|
468
|
+
/** @description Whether settlement is pending (market resolved or voided, settlement not yet executed) */
|
|
469
|
+
is_settlement_pending: boolean;
|
|
470
|
+
/** @description Whether the market was voided (closed with no winner, 50/50 payout at $0.50 per token) */
|
|
471
|
+
is_voided: boolean;
|
|
554
472
|
/**
|
|
555
|
-
* @description
|
|
556
|
-
* @example
|
|
473
|
+
* @description ISO 8601 timestamp when market closes
|
|
474
|
+
* @example 2025-01-20T12:00:00.000Z
|
|
557
475
|
*/
|
|
558
|
-
|
|
476
|
+
market_close_time?: string;
|
|
559
477
|
/**
|
|
560
|
-
* @description
|
|
561
|
-
* @example
|
|
478
|
+
* @description Market status from the prediction market provider. When 'determined' or 'finalized', mark price reflects the settlement outcome ($1 or $0)
|
|
479
|
+
* @example active
|
|
480
|
+
* @enum {string}
|
|
562
481
|
*/
|
|
563
|
-
|
|
482
|
+
market_status: "active" | "amended" | "closed" | "determined" | "disputed" | "finalized" | "inactive" | "initialized";
|
|
564
483
|
/**
|
|
565
|
-
* @description
|
|
566
|
-
* @example
|
|
484
|
+
* @description Where this market sits on the road to settlement. `none` — still trading, nothing pending. `awaiting_resolution` — the market has closed and the outcome is decided, but the prediction market provider has not yet published the result on chain, so nothing can be redeemed yet. `settling` — the result is published and we are settling the position. `voided` — the market was voided and every token pays out at $0.50. `unresolved_upstream` — the market disappeared from the provider before publishing a result and may never resolve.
|
|
485
|
+
* @example awaiting_resolution
|
|
486
|
+
* @enum {string}
|
|
567
487
|
*/
|
|
568
|
-
|
|
488
|
+
settlement_state: "awaiting_resolution" | "none" | "settling" | "unresolved_upstream" | "voided";
|
|
569
489
|
/**
|
|
570
|
-
* @description
|
|
571
|
-
* @example
|
|
490
|
+
* @description Minutes until market closes
|
|
491
|
+
* @example 1440
|
|
572
492
|
*/
|
|
573
|
-
|
|
493
|
+
time_to_close_minutes?: number;
|
|
494
|
+
};
|
|
495
|
+
CustomerOpenPosition: {
|
|
496
|
+
/** @description Entry details */
|
|
497
|
+
entry: components["schemas"]["CustomerPositionEntry"];
|
|
498
|
+
/** @description Failure details if the position failed */
|
|
499
|
+
failure?: components["schemas"]["CustomerPositionFailure"];
|
|
574
500
|
/**
|
|
575
|
-
* @description
|
|
576
|
-
* @example
|
|
501
|
+
* @description Position ID
|
|
502
|
+
* @example dm_pos_abc123
|
|
577
503
|
*/
|
|
578
|
-
|
|
579
|
-
/** @description Per-side eligibility. A market may accept positions on one side while rejecting the other (e.g. thin opposite-side liquidity, side max-leverage below the floor). */
|
|
580
|
-
sided_eligibility: components["schemas"]["CustomerSidedEligibility"];
|
|
581
|
-
/** @description Subtitle for the YES outcome */
|
|
582
|
-
yes_sub_title?: string;
|
|
583
|
-
};
|
|
584
|
-
CustomerPositionEntry: {
|
|
504
|
+
id: string;
|
|
585
505
|
/**
|
|
586
|
-
* @description
|
|
587
|
-
* @example
|
|
506
|
+
* @description Name of the partner the position was opened through.
|
|
507
|
+
* @example Acme Markets
|
|
588
508
|
*/
|
|
589
|
-
|
|
509
|
+
partner: string;
|
|
590
510
|
/**
|
|
591
|
-
* @description
|
|
592
|
-
* @
|
|
511
|
+
* @description Prediction market provider
|
|
512
|
+
* @enum {string}
|
|
593
513
|
*/
|
|
594
|
-
|
|
514
|
+
provider: "polymarket";
|
|
595
515
|
/**
|
|
596
|
-
* @description
|
|
597
|
-
* @
|
|
516
|
+
* @description Market side
|
|
517
|
+
* @enum {string}
|
|
598
518
|
*/
|
|
599
|
-
|
|
519
|
+
side: "yes" | "no";
|
|
600
520
|
/**
|
|
601
|
-
* @description
|
|
602
|
-
* @example adaptive
|
|
521
|
+
* @description Simplified position status. A position that was deleveraged almost entirely and then force-sold for a trivial remainder reports 'settled' once the market resolves against it. The 'status' query parameter still filters on the underlying mechanism, so such a position is returned by status=liquidated.
|
|
603
522
|
* @enum {string}
|
|
604
523
|
*/
|
|
605
|
-
|
|
524
|
+
status: "pending" | "open" | "unwinding" | "closing" | "settling" | "closed" | "settled" | "liquidated" | "cancelled";
|
|
525
|
+
/** @description Inline unwind history. Only present when the request includes `expand=unwinds`; omitted otherwise. */
|
|
526
|
+
unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
527
|
+
/** @description Current position state */
|
|
528
|
+
current: components["schemas"]["CustomerPositionCurrent"];
|
|
529
|
+
/** @description Fee details for open position */
|
|
530
|
+
fees: components["schemas"]["CustomerPositionOpenFees"];
|
|
531
|
+
/** @description Risk metrics */
|
|
532
|
+
risk: components["schemas"]["CustomerPositionRisk"];
|
|
533
|
+
/** @description Timing information */
|
|
534
|
+
timing: components["schemas"]["CustomerPositionTiming"];
|
|
606
535
|
/**
|
|
607
|
-
* @description
|
|
608
|
-
* @example
|
|
536
|
+
* @description Time-weighted average structural leverage in basis points over position lifetime (20000 = 2x)
|
|
537
|
+
* @example 84000
|
|
609
538
|
*/
|
|
610
|
-
|
|
539
|
+
effective_leverage_bps: number;
|
|
611
540
|
/**
|
|
612
|
-
* @description
|
|
613
|
-
* @example
|
|
541
|
+
* @description Market ticker identifier
|
|
542
|
+
* @example TRUMP-2024-WIN
|
|
614
543
|
*/
|
|
615
|
-
|
|
544
|
+
market_ticker: string;
|
|
545
|
+
/** @description Market title */
|
|
546
|
+
market_title?: string;
|
|
547
|
+
/** @description On-chain position key (bytes32) for requestClose", example: "0xabc123... */
|
|
548
|
+
on_chain_position_key: string;
|
|
616
549
|
/**
|
|
617
|
-
* @description
|
|
618
|
-
* @example
|
|
550
|
+
* @description Wallet address (Solana public key or EVM address)
|
|
551
|
+
* @example 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
|
|
619
552
|
*/
|
|
620
|
-
|
|
553
|
+
wallet_address: string;
|
|
554
|
+
/** @description The committed-mode ladder this position was opened on: one row per planned unwind, each with a status of planned, triggered or superseded. Only present when the request includes `expand=planned_unwinds`; omitted otherwise, and empty on adaptive positions. */
|
|
555
|
+
planned_unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
621
556
|
/**
|
|
622
|
-
* @
|
|
623
|
-
* @
|
|
557
|
+
* @deprecated
|
|
558
|
+
* @description Deprecated — use `pendingOperation` (a deferred close now surfaces as `{ type: 'close', phase: 'awaiting_settlement' }`). Details of a close request that could not complete and was deferred. Null unless the customer requested a close that is now waiting on market settlement to redeem the remaining tokens.
|
|
624
559
|
*/
|
|
625
|
-
|
|
560
|
+
close_attempt?: components["schemas"]["CustomerCloseAttempt"] | null;
|
|
561
|
+
/** @description The lifecycle operation currently in flight on this position, or null when the position is at rest. Survives reload (unlike the ephemeral websocket events), so a UI can show that a close / partial close / unwind / settle is in progress after re-fetching REST. */
|
|
562
|
+
pending_operation?: components["schemas"]["CustomerPendingOperation"] | null;
|
|
563
|
+
};
|
|
564
|
+
CustomerPositionClosedFees: {
|
|
626
565
|
/**
|
|
627
|
-
* @description
|
|
628
|
-
* @example
|
|
566
|
+
* @description Lifetime fee APR in basis points
|
|
567
|
+
* @example 500
|
|
629
568
|
*/
|
|
630
|
-
|
|
569
|
+
lifetime_apr_bps: number;
|
|
631
570
|
/**
|
|
632
|
-
* @
|
|
571
|
+
* @deprecated
|
|
572
|
+
* @description Deprecated — use `entry.originationFeeBps`. Same value, kept for backwards compatibility.
|
|
633
573
|
* @example 100
|
|
634
574
|
*/
|
|
635
575
|
origination_fee_bps: number;
|
|
636
576
|
/**
|
|
637
|
-
* @
|
|
577
|
+
* @deprecated
|
|
578
|
+
* @description Deprecated — use `entry.protocolOriginationFeeBps`. Same value, kept for backwards compatibility.
|
|
638
579
|
* @example 80
|
|
639
580
|
*/
|
|
640
581
|
protocol_origination_fee_bps: number;
|
|
641
582
|
/**
|
|
642
|
-
* @
|
|
583
|
+
* @deprecated
|
|
584
|
+
* @description Deprecated — use `entry.partnerOriginationFeeBps`. Same value, kept for backwards compatibility.
|
|
643
585
|
* @example 20
|
|
644
586
|
*/
|
|
645
587
|
partner_origination_fee_bps: number;
|
|
646
588
|
/**
|
|
647
|
-
* @
|
|
589
|
+
* @deprecated
|
|
590
|
+
* @description Deprecated — use `entry.originationFeeUsd`. Same value, kept for backwards compatibility.
|
|
648
591
|
* @example 0.05
|
|
649
592
|
*/
|
|
650
593
|
origination_fee_usd: string;
|
|
651
594
|
/**
|
|
652
|
-
* @
|
|
595
|
+
* @deprecated
|
|
596
|
+
* @description Deprecated — use `entry.originationFeeUsdPips`. Same value, kept for backwards compatibility.
|
|
653
597
|
* @example 500
|
|
654
598
|
*/
|
|
655
599
|
origination_fee_usd_pips: string;
|
|
656
600
|
/**
|
|
657
|
-
* @description
|
|
658
|
-
* @example 0.
|
|
659
|
-
*/
|
|
660
|
-
price_usd: string;
|
|
661
|
-
/**
|
|
662
|
-
* @description Entry price in USD pips
|
|
663
|
-
* @example 5000
|
|
601
|
+
* @description Total blended fees formatted as USD
|
|
602
|
+
* @example 0.085
|
|
664
603
|
*/
|
|
665
|
-
|
|
604
|
+
total_fees_usd: string;
|
|
666
605
|
/**
|
|
667
|
-
* @description
|
|
668
|
-
* @example
|
|
606
|
+
* @description Total blended fees (origination + lifetime + liquidation + venue) in USD pips
|
|
607
|
+
* @example 850
|
|
669
608
|
*/
|
|
670
|
-
|
|
609
|
+
total_fees_usd_pips: string;
|
|
671
610
|
/**
|
|
672
|
-
* @description
|
|
673
|
-
* @example
|
|
611
|
+
* @description Total lifetime fee formatted as USD
|
|
612
|
+
* @example 0.015
|
|
674
613
|
*/
|
|
675
|
-
|
|
614
|
+
total_lifetime_fee_usd: string;
|
|
676
615
|
/**
|
|
677
|
-
* @description
|
|
678
|
-
* @example
|
|
616
|
+
* @description Total lifetime fee collected in USD pips
|
|
617
|
+
* @example 150
|
|
679
618
|
*/
|
|
680
|
-
|
|
619
|
+
total_lifetime_fee_usd_pips: string;
|
|
681
620
|
/**
|
|
682
|
-
* @description
|
|
683
|
-
* @example
|
|
621
|
+
* @description Total venue (Polymarket) trading fees collected across the position lifetime (open + close/liquidation/settle + force-unwind), formatted as USD.
|
|
622
|
+
* @example 0.02
|
|
684
623
|
*/
|
|
685
|
-
|
|
624
|
+
total_venue_fee_usd: string;
|
|
686
625
|
/**
|
|
687
|
-
* @description
|
|
688
|
-
* @example
|
|
626
|
+
* @description Total venue trading fees collected across the position lifetime in USD pips.
|
|
627
|
+
* @example 200
|
|
689
628
|
*/
|
|
690
|
-
|
|
629
|
+
total_venue_fee_usd_pips: string;
|
|
691
630
|
};
|
|
692
|
-
|
|
631
|
+
CustomerPositionResult: {
|
|
693
632
|
/**
|
|
694
|
-
* @description
|
|
695
|
-
* @example
|
|
696
|
-
*/
|
|
697
|
-
reason: string;
|
|
698
|
-
};
|
|
699
|
-
CustomerPositionUnwind: {
|
|
700
|
-
/**
|
|
701
|
-
* @description executed: an unwind that landed on-chain, as recorded by the deleveraging itself. planned: a committed-mode rung that fires if the price reaches triggerPriceUsdPips. triggered: a committed-mode rung whose trigger price was reached, stamped with executedAt. superseded: a committed-mode rung that can no longer fire because a partial close already took the position below its target leverage. Rung rows (planned, triggered, superseded) are the signed ladder and are only returned when the request asks for them; they describe what was promised, while executed rows describe what actually happened.
|
|
702
|
-
* @example executed
|
|
703
|
-
* @enum {string}
|
|
704
|
-
*/
|
|
705
|
-
status: "executed" | "planned" | "superseded" | "triggered";
|
|
706
|
-
/**
|
|
707
|
-
* @description The market signal that triggered the risk-model inference behind this unwind (e.g. `spread_blowout`, `depth_decay`, `price_drop_severe`). Null for unwinds not tied to an inference run, such as manually triggered deleveraging.
|
|
708
|
-
* @example spread_blowout
|
|
709
|
-
* @enum {string|null}
|
|
633
|
+
* @description ISO 8601 timestamp when position was closed
|
|
634
|
+
* @example 2025-01-16T14:30:00.000Z
|
|
710
635
|
*/
|
|
711
|
-
|
|
636
|
+
closed_at: string;
|
|
712
637
|
/**
|
|
713
|
-
* @description
|
|
714
|
-
* @example
|
|
638
|
+
* @description Collected lifetime fee formatted as USD
|
|
639
|
+
* @example 0.015
|
|
715
640
|
*/
|
|
716
|
-
|
|
641
|
+
collected_lifetime_fee_usd: string;
|
|
717
642
|
/**
|
|
718
|
-
* @description
|
|
719
|
-
* @example
|
|
643
|
+
* @description Collected lifetime fee in USD pips
|
|
644
|
+
* @example 150
|
|
720
645
|
*/
|
|
721
|
-
|
|
646
|
+
collected_lifetime_fee_usd_pips: string;
|
|
722
647
|
/**
|
|
723
|
-
* @description
|
|
724
|
-
* @example
|
|
648
|
+
* @description Collected liquidation fee formatted as USD
|
|
649
|
+
* @example 0.00
|
|
725
650
|
*/
|
|
726
|
-
|
|
651
|
+
collected_liquidation_fee_usd: string;
|
|
727
652
|
/**
|
|
728
|
-
* @description
|
|
729
|
-
* @example
|
|
653
|
+
* @description Collected liquidation fee in USD pips
|
|
654
|
+
* @example 0
|
|
730
655
|
*/
|
|
731
|
-
|
|
656
|
+
collected_liquidation_fee_usd_pips: string;
|
|
732
657
|
/**
|
|
733
|
-
* @description
|
|
734
|
-
* @example
|
|
658
|
+
* @description Volume-weighted notional realized across all unwinds and the final close, formatted as USD. Null for reverted or cancelled positions.
|
|
659
|
+
* @example 5.25
|
|
735
660
|
*/
|
|
736
|
-
|
|
737
|
-
};
|
|
738
|
-
CustomerPositionUnwindList: {
|
|
739
|
-
data: components["schemas"]["CustomerPositionUnwind"][];
|
|
740
|
-
has_more: boolean;
|
|
741
|
-
total_count?: number;
|
|
661
|
+
exit_notional_usd?: string | null;
|
|
742
662
|
/**
|
|
743
|
-
* @description
|
|
744
|
-
* @example
|
|
663
|
+
* @description Exit notional in USD pips. Null for reverted or cancelled positions.
|
|
664
|
+
* @example 52500
|
|
745
665
|
*/
|
|
746
|
-
|
|
666
|
+
exit_notional_usd_pips?: string | null;
|
|
747
667
|
/**
|
|
748
|
-
* @description
|
|
749
|
-
* @example
|
|
668
|
+
* @description Whether every amount in this block is settled and will not be restated. False while the closing, liquidating or settling transaction is still in flight, when proceeds have not yet been credited and the PnL figures are provisional. Always true for reverted and cancelled positions, which have no proceeds to credit. Wait for true before booking a result. Absent on responses served by a pod that predates this field, so treat a missing value as not-yet-determined rather than as false.
|
|
669
|
+
* @example true
|
|
750
670
|
*/
|
|
751
|
-
|
|
671
|
+
is_final?: boolean;
|
|
752
672
|
/**
|
|
753
|
-
* @description
|
|
754
|
-
* @example
|
|
673
|
+
* @description Realized PnL net of all fees (origination + lifetime + liquidation + venue) as return on equity in basis points
|
|
674
|
+
* @example 1700
|
|
755
675
|
*/
|
|
756
|
-
|
|
757
|
-
};
|
|
758
|
-
CustomerCloseAttempt: {
|
|
676
|
+
net_realized_pnl_bps: number;
|
|
759
677
|
/**
|
|
760
|
-
* @description
|
|
761
|
-
* @
|
|
678
|
+
* @description Realized PnL net of all fees (origination + lifetime + liquidation + venue) formatted as USD
|
|
679
|
+
* @example 0.435
|
|
762
680
|
*/
|
|
763
|
-
|
|
681
|
+
net_realized_pnl_usd: string;
|
|
764
682
|
/**
|
|
765
|
-
* @description
|
|
766
|
-
* @
|
|
683
|
+
* @description Realized PnL net of all fees (origination + lifetime + liquidation + venue) in USD pips (can be negative)
|
|
684
|
+
* @example 4350
|
|
767
685
|
*/
|
|
768
|
-
|
|
686
|
+
net_realized_pnl_usd_pips: string;
|
|
769
687
|
/**
|
|
770
|
-
* @description
|
|
771
|
-
* @example
|
|
688
|
+
* @description Proceeds formatted as USD
|
|
689
|
+
* @example 3.00
|
|
772
690
|
*/
|
|
773
|
-
|
|
774
|
-
};
|
|
775
|
-
CustomerPendingOperation: {
|
|
691
|
+
proceeds_usd: string;
|
|
776
692
|
/**
|
|
777
|
-
* @description
|
|
778
|
-
* @
|
|
693
|
+
* @description Proceeds returned to user in USD pips
|
|
694
|
+
* @example 30000
|
|
779
695
|
*/
|
|
780
|
-
|
|
696
|
+
proceeds_usd_pips: string;
|
|
781
697
|
/**
|
|
782
|
-
* @description
|
|
783
|
-
* @example
|
|
784
|
-
* @enum {string|null}
|
|
698
|
+
* @description Realized PnL formatted as USD
|
|
699
|
+
* @example 0.50
|
|
785
700
|
*/
|
|
786
|
-
|
|
701
|
+
realized_pnl_usd: string;
|
|
787
702
|
/**
|
|
788
|
-
* @description
|
|
789
|
-
* @example
|
|
703
|
+
* @description Realized PnL in USD pips (can be negative)
|
|
704
|
+
* @example 5000
|
|
790
705
|
*/
|
|
791
|
-
|
|
706
|
+
realized_pnl_usd_pips: string;
|
|
792
707
|
};
|
|
793
|
-
|
|
708
|
+
CustomerClosedPosition: {
|
|
709
|
+
/** @description Entry details */
|
|
710
|
+
entry: components["schemas"]["CustomerPositionEntry"];
|
|
711
|
+
/** @description Failure details if the position failed */
|
|
712
|
+
failure?: components["schemas"]["CustomerPositionFailure"];
|
|
794
713
|
/**
|
|
795
|
-
* @description
|
|
796
|
-
* @example
|
|
714
|
+
* @description Position ID
|
|
715
|
+
* @example dm_pos_abc123
|
|
797
716
|
*/
|
|
798
|
-
|
|
717
|
+
id: string;
|
|
799
718
|
/**
|
|
800
|
-
* @description
|
|
801
|
-
* @example
|
|
719
|
+
* @description Name of the partner the position was opened through.
|
|
720
|
+
* @example Acme Markets
|
|
802
721
|
*/
|
|
803
|
-
|
|
722
|
+
partner: string;
|
|
804
723
|
/**
|
|
805
|
-
* @description
|
|
806
|
-
* @
|
|
724
|
+
* @description Prediction market provider
|
|
725
|
+
* @enum {string}
|
|
807
726
|
*/
|
|
808
|
-
|
|
727
|
+
provider: "polymarket";
|
|
809
728
|
/**
|
|
810
|
-
* @description
|
|
811
|
-
* @
|
|
729
|
+
* @description Market side
|
|
730
|
+
* @enum {string}
|
|
812
731
|
*/
|
|
813
|
-
|
|
732
|
+
side: "yes" | "no";
|
|
814
733
|
/**
|
|
815
|
-
* @description
|
|
816
|
-
* @
|
|
734
|
+
* @description Simplified position status. A position that was deleveraged almost entirely and then force-sold for a trivial remainder reports 'settled' once the market resolves against it. The 'status' query parameter still filters on the underlying mechanism, so such a position is returned by status=liquidated.
|
|
735
|
+
* @enum {string}
|
|
817
736
|
*/
|
|
818
|
-
|
|
737
|
+
status: "pending" | "open" | "unwinding" | "closing" | "settling" | "closed" | "settled" | "liquidated" | "cancelled";
|
|
738
|
+
/** @description Inline unwind history. Only present when the request includes `expand=unwinds`; omitted otherwise. */
|
|
739
|
+
unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
740
|
+
/** @description Fee details for closed position */
|
|
741
|
+
fees: components["schemas"]["CustomerPositionClosedFees"];
|
|
742
|
+
/** @description Position result/outcome */
|
|
743
|
+
result: components["schemas"]["CustomerPositionResult"];
|
|
819
744
|
/**
|
|
820
|
-
* @
|
|
821
|
-
* @
|
|
822
|
-
* @example 18000
|
|
745
|
+
* @description Time-weighted average structural leverage in basis points over position lifetime (20000 = 2x)
|
|
746
|
+
* @example 84000
|
|
823
747
|
*/
|
|
824
|
-
|
|
748
|
+
effective_leverage_bps: number;
|
|
825
749
|
/**
|
|
826
|
-
* @description
|
|
827
|
-
* @example
|
|
750
|
+
* @description Market ticker identifier
|
|
751
|
+
* @example TRUMP-2024-WIN
|
|
828
752
|
*/
|
|
829
|
-
|
|
753
|
+
market_ticker: string;
|
|
754
|
+
/** @description Market title */
|
|
755
|
+
market_title?: string;
|
|
756
|
+
/** @description On-chain position key (bytes32) for requestClose", example: "0xabc123... */
|
|
757
|
+
on_chain_position_key: string;
|
|
830
758
|
/**
|
|
831
|
-
* @description
|
|
832
|
-
* @example
|
|
759
|
+
* @description Wallet address (Solana public key or EVM address)
|
|
760
|
+
* @example 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
|
|
833
761
|
*/
|
|
834
|
-
|
|
762
|
+
wallet_address: string;
|
|
763
|
+
/** @description The committed-mode ladder this position was opened on: one row per planned unwind, each with a status of planned, triggered or superseded. Only present when the request includes `expand=planned_unwinds`; omitted otherwise, and empty on adaptive positions. */
|
|
764
|
+
planned_unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
835
765
|
/**
|
|
836
|
-
* @description
|
|
837
|
-
* @
|
|
766
|
+
* @description Reason the position was closed. Reports 'settled' for a position that was deleveraged almost entirely and then force-sold for a trivial remainder on a market that resolved against it.
|
|
767
|
+
* @enum {string}
|
|
838
768
|
*/
|
|
839
|
-
|
|
769
|
+
close_reason: "cancelled" | "closed" | "liquidated" | "reverted" | "settled";
|
|
840
770
|
/**
|
|
841
|
-
* @description
|
|
842
|
-
* @
|
|
771
|
+
* @description Why the position was reverted before it opened. Non-null only when `close_reason` is `reverted`: `exchange_unavailable` (the prediction-market venue was temporarily unavailable — safe to retry), `slippage_exceeded` (price moved beyond tolerance before the order filled), or `unknown`.
|
|
772
|
+
* @enum {string|null}
|
|
843
773
|
*/
|
|
844
|
-
|
|
774
|
+
revert_reason?: "exchange_unavailable" | "slippage_exceeded" | "unknown" | null;
|
|
775
|
+
};
|
|
776
|
+
CustomerMarketEvent: {
|
|
845
777
|
/**
|
|
846
|
-
* @description
|
|
847
|
-
* @example
|
|
778
|
+
* @description Ticker of the event this market belongs to — the real-world happening the market resolves against, such as one game or one hourly price window. Pass it to GET /events/{event_ticker}/markets to list every market on the same event.
|
|
779
|
+
* @example btc-updown-5m-1786109700
|
|
848
780
|
*/
|
|
849
|
-
|
|
781
|
+
ticker: string;
|
|
850
782
|
/**
|
|
851
|
-
* @description
|
|
852
|
-
* @example
|
|
783
|
+
* @description Human-readable event title, or null when the upstream feed did not supply one.
|
|
784
|
+
* @example Bitcoin Up or Down - August 7, 9:35AM-9:40AM ET
|
|
853
785
|
*/
|
|
854
|
-
|
|
786
|
+
title: string | null;
|
|
855
787
|
/**
|
|
856
|
-
* @description
|
|
857
|
-
* @example
|
|
788
|
+
* @description Ticker of the series this event belongs to, or null when the event has no series. Pass it to GET /series/{series_ticker}/markets to list every market in the series.
|
|
789
|
+
* @example btc-up-or-down-5m
|
|
858
790
|
*/
|
|
859
|
-
|
|
791
|
+
series_ticker: string | null;
|
|
792
|
+
};
|
|
793
|
+
CustomerOriginationTier: {
|
|
860
794
|
/**
|
|
861
|
-
* @description
|
|
862
|
-
* @example
|
|
795
|
+
* @description Origination fee in basis points for this tier
|
|
796
|
+
* @example 100
|
|
863
797
|
*/
|
|
864
|
-
|
|
798
|
+
fee_bps: number;
|
|
865
799
|
/**
|
|
866
|
-
* @description
|
|
867
|
-
* @example
|
|
800
|
+
* @description Maximum leverage in basis points for this tier
|
|
801
|
+
* @example 20000
|
|
868
802
|
*/
|
|
869
|
-
|
|
803
|
+
max_leverage_bps: number;
|
|
804
|
+
};
|
|
805
|
+
CustomerFees: {
|
|
870
806
|
/**
|
|
871
|
-
* @description
|
|
872
|
-
* @example
|
|
807
|
+
* @description Lifetime fee APR in basis points
|
|
808
|
+
* @example 500
|
|
873
809
|
*/
|
|
874
|
-
|
|
810
|
+
lifetime_apr_bps: number;
|
|
875
811
|
/**
|
|
876
|
-
* @description
|
|
877
|
-
* @example
|
|
812
|
+
* @description Liquidation fee in basis points
|
|
813
|
+
* @example 200
|
|
878
814
|
*/
|
|
879
|
-
|
|
815
|
+
liquidation_bps: number;
|
|
816
|
+
/** @description Origination fee tiers by leverage */
|
|
817
|
+
origination_tiers: components["schemas"]["CustomerOriginationTier"][];
|
|
818
|
+
};
|
|
819
|
+
CustomerMaxMarketLeveragePerNotional: {
|
|
880
820
|
/**
|
|
881
|
-
* @description
|
|
882
|
-
* @example
|
|
821
|
+
* @description Maximum market leverage in basis points when the position notional is $100
|
|
822
|
+
* @example 100000
|
|
883
823
|
*/
|
|
884
|
-
|
|
824
|
+
at100_usd_bps: number;
|
|
885
825
|
/**
|
|
886
|
-
* @description
|
|
887
|
-
* @example
|
|
826
|
+
* @description Maximum market leverage in basis points when the position notional is $500
|
|
827
|
+
* @example 80000
|
|
888
828
|
*/
|
|
889
|
-
|
|
829
|
+
at500_usd_bps: number;
|
|
890
830
|
/**
|
|
891
|
-
* @description
|
|
892
|
-
* @example
|
|
831
|
+
* @description Maximum market leverage in basis points when the position notional is $1,000
|
|
832
|
+
* @example 60000
|
|
893
833
|
*/
|
|
894
|
-
|
|
834
|
+
at1000_usd_bps: number;
|
|
895
835
|
/**
|
|
896
|
-
* @description
|
|
897
|
-
* @example
|
|
836
|
+
* @description Maximum market leverage in basis points when the position notional is $10,000
|
|
837
|
+
* @example 30000
|
|
898
838
|
*/
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
839
|
+
at10000_usd_bps: number;
|
|
840
|
+
};
|
|
841
|
+
CustomerSidedMaxMarketLeveragePerNotional: {
|
|
842
|
+
/** @description Per-notional max market leverage for the YES side */
|
|
843
|
+
yes: components["schemas"]["CustomerMaxMarketLeveragePerNotional"];
|
|
844
|
+
/** @description Per-notional max market leverage for the NO side */
|
|
845
|
+
no: components["schemas"]["CustomerMaxMarketLeveragePerNotional"];
|
|
846
|
+
};
|
|
847
|
+
CustomerLeverage: {
|
|
848
|
+
/**
|
|
849
|
+
* @deprecated
|
|
850
|
+
* @description Deprecated: use maxYesBps and maxNoBps. Populated as min(maxYesBps, maxNoBps) for backwards compatibility.
|
|
851
|
+
* @example 50000
|
|
903
852
|
*/
|
|
904
|
-
|
|
853
|
+
max_bps: number;
|
|
854
|
+
/** @description Max market leverage per side, broken out by position notional. Slippage grows with notional, so larger notionals have lower max leverage. The UI slider should publish the leverage that matches the user's selected notional. */
|
|
855
|
+
max_market_leverage_per_notional: components["schemas"]["CustomerSidedMaxMarketLeveragePerNotional"];
|
|
905
856
|
/**
|
|
906
|
-
* @description
|
|
907
|
-
* @example
|
|
857
|
+
* @description Maximum leverage in basis points for the NO side
|
|
858
|
+
* @example 50000
|
|
908
859
|
*/
|
|
909
|
-
|
|
910
|
-
};
|
|
911
|
-
CustomerPositionOpenFees: {
|
|
860
|
+
max_no_bps: number;
|
|
912
861
|
/**
|
|
913
|
-
* @description
|
|
914
|
-
* @example
|
|
862
|
+
* @description Maximum leverage in basis points for the YES side
|
|
863
|
+
* @example 50000
|
|
915
864
|
*/
|
|
916
|
-
|
|
865
|
+
max_yes_bps: number;
|
|
917
866
|
/**
|
|
918
|
-
* @description
|
|
919
|
-
* @example
|
|
867
|
+
* @description Minimum leverage in basis points
|
|
868
|
+
* @example 10000
|
|
920
869
|
*/
|
|
921
|
-
|
|
870
|
+
min_bps: number;
|
|
922
871
|
/**
|
|
923
|
-
* @description
|
|
924
|
-
* @example
|
|
872
|
+
* @description Leverage step increment in basis points
|
|
873
|
+
* @example 1000
|
|
925
874
|
*/
|
|
926
|
-
|
|
875
|
+
step_bps: number;
|
|
876
|
+
};
|
|
877
|
+
CustomerMarketPolymarket: {
|
|
927
878
|
/**
|
|
928
|
-
* @description
|
|
929
|
-
* @example
|
|
879
|
+
* @description Polymarket market slug, matching the slug in Polymarket URLs and Gamma API responses.
|
|
880
|
+
* @example will-trump-win-the-2024-election
|
|
930
881
|
*/
|
|
931
|
-
|
|
882
|
+
slug: string;
|
|
932
883
|
/**
|
|
933
|
-
* @description
|
|
934
|
-
* @example
|
|
884
|
+
* @description Polymarket CTF condition ID for this market. Use it to look the market up on Polymarket's CLOB and Gamma APIs. Null for the small number of markets where Polymarket has not exposed a condition ID.
|
|
885
|
+
* @example 0xabc123def4567890abc123def4567890abc123def4567890abc123def4567890
|
|
935
886
|
*/
|
|
936
|
-
|
|
887
|
+
condition_id?: string | null;
|
|
937
888
|
/**
|
|
938
|
-
* @description
|
|
939
|
-
* @example
|
|
889
|
+
* @description Polymarket CLOB token ID for the NO outcome (the ERC1155 position token ID).
|
|
890
|
+
* @example 71321045679252212594626385532706912750332728571942532289631379312455583992563
|
|
940
891
|
*/
|
|
941
|
-
|
|
892
|
+
no_token_id: string;
|
|
942
893
|
/**
|
|
943
|
-
* @description
|
|
944
|
-
* @example
|
|
894
|
+
* @description Polymarket CLOB token ID for the YES outcome (the ERC1155 position token ID).
|
|
895
|
+
* @example 21742633143463906290569050155826241533067272736897614950488156847949938836455
|
|
945
896
|
*/
|
|
946
|
-
|
|
897
|
+
yes_token_id: string;
|
|
898
|
+
};
|
|
899
|
+
CustomerSideEligibility: {
|
|
947
900
|
/**
|
|
948
|
-
* @description
|
|
949
|
-
* @example
|
|
901
|
+
* @description Whether this market is accepting new positions on this side
|
|
902
|
+
* @example true
|
|
950
903
|
*/
|
|
951
|
-
|
|
904
|
+
accepting_new_positions: boolean;
|
|
952
905
|
/**
|
|
953
|
-
* @description
|
|
954
|
-
* @example
|
|
906
|
+
* @description Reason code if this side is not accepting new positions; null when accepting
|
|
907
|
+
* @example QUOTE_MARKET_NOT_ELIGIBLE
|
|
955
908
|
*/
|
|
956
|
-
|
|
909
|
+
rejection_reason_code?: string | null;
|
|
957
910
|
};
|
|
958
|
-
|
|
911
|
+
CustomerSidedEligibility: {
|
|
912
|
+
/** @description Eligibility for the YES side */
|
|
913
|
+
yes: components["schemas"]["CustomerSideEligibility"];
|
|
914
|
+
/** @description Eligibility for the NO side */
|
|
915
|
+
no: components["schemas"]["CustomerSideEligibility"];
|
|
916
|
+
};
|
|
917
|
+
CustomerMarketPrices: {
|
|
959
918
|
/**
|
|
960
|
-
* @description
|
|
961
|
-
* @example 0.
|
|
919
|
+
* @description NO side ask price formatted as USD
|
|
920
|
+
* @example 0.51
|
|
962
921
|
*/
|
|
963
|
-
|
|
922
|
+
no_ask_price_usd: string;
|
|
964
923
|
/**
|
|
965
|
-
* @description
|
|
966
|
-
* @example
|
|
924
|
+
* @description NO side ask price in USD pips (10000 pips = $1)
|
|
925
|
+
* @example 5100
|
|
967
926
|
*/
|
|
968
|
-
|
|
927
|
+
no_ask_price_usd_pips: string;
|
|
969
928
|
/**
|
|
970
|
-
* @description
|
|
971
|
-
* @example
|
|
929
|
+
* @description NO side bid price formatted as USD
|
|
930
|
+
* @example 0.49
|
|
972
931
|
*/
|
|
973
|
-
|
|
932
|
+
no_bid_price_usd: string;
|
|
974
933
|
/**
|
|
975
|
-
* @description
|
|
976
|
-
* @example
|
|
934
|
+
* @description NO side bid price in USD pips (10000 pips = $1)
|
|
935
|
+
* @example 4900
|
|
977
936
|
*/
|
|
978
|
-
|
|
937
|
+
no_bid_price_usd_pips: string;
|
|
979
938
|
/**
|
|
980
|
-
* @description
|
|
981
|
-
* @example
|
|
939
|
+
* @description YES side ask price formatted as USD
|
|
940
|
+
* @example 0.51
|
|
982
941
|
*/
|
|
983
|
-
|
|
942
|
+
yes_ask_price_usd: string;
|
|
984
943
|
/**
|
|
985
|
-
* @description
|
|
986
|
-
* @example
|
|
944
|
+
* @description YES side ask price in USD pips (10000 pips = $1)
|
|
945
|
+
* @example 5100
|
|
987
946
|
*/
|
|
988
|
-
|
|
947
|
+
yes_ask_price_usd_pips: string;
|
|
989
948
|
/**
|
|
990
|
-
* @description
|
|
991
|
-
* @example
|
|
949
|
+
* @description YES side bid price formatted as USD
|
|
950
|
+
* @example 0.49
|
|
992
951
|
*/
|
|
993
|
-
|
|
952
|
+
yes_bid_price_usd: string;
|
|
953
|
+
/**
|
|
954
|
+
* @description YES side bid price in USD pips (10000 pips = $1)
|
|
955
|
+
* @example 4900
|
|
956
|
+
*/
|
|
957
|
+
yes_bid_price_usd_pips: string;
|
|
994
958
|
};
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
959
|
+
CustomerMarket: {
|
|
960
|
+
/**
|
|
961
|
+
* @description Market category
|
|
962
|
+
* @example politics
|
|
963
|
+
*/
|
|
964
|
+
category: string;
|
|
965
|
+
/** @description The event this market belongs to. Use its tickers to fetch sibling markets or your own positions scoped to the same event or series. */
|
|
966
|
+
event: components["schemas"]["CustomerMarketEvent"];
|
|
967
|
+
/** @description Fee configuration */
|
|
968
|
+
fees: components["schemas"]["CustomerFees"];
|
|
969
|
+
/**
|
|
970
|
+
* @description Market ID
|
|
971
|
+
* @example dm_mkt_abc123
|
|
972
|
+
*/
|
|
973
|
+
id: string;
|
|
974
|
+
/** @description Leverage configuration */
|
|
975
|
+
leverage: components["schemas"]["CustomerLeverage"];
|
|
976
|
+
/**
|
|
977
|
+
* @description Prediction market provider
|
|
978
|
+
* @enum {string}
|
|
979
|
+
*/
|
|
980
|
+
provider: "polymarket";
|
|
981
|
+
/**
|
|
982
|
+
* @description Current market status
|
|
983
|
+
* @enum {string}
|
|
984
|
+
*/
|
|
985
|
+
status: "active" | "amended" | "closed" | "determined" | "disputed" | "finalized" | "inactive" | "initialized";
|
|
986
|
+
/**
|
|
987
|
+
* @description Market tags for filtering
|
|
988
|
+
* @example [
|
|
989
|
+
* "politics",
|
|
990
|
+
* "election"
|
|
991
|
+
* ]
|
|
992
|
+
*/
|
|
993
|
+
tags: string[];
|
|
994
|
+
/** @description Polymarket identifiers for this market, for mapping our markets onto Polymarket data feeds. Always present (all live markets are Polymarket-sourced). */
|
|
995
|
+
polymarket: components["schemas"]["CustomerMarketPolymarket"];
|
|
996
|
+
/**
|
|
997
|
+
* @deprecated
|
|
998
|
+
* @description Deprecated: use `polymarket.slug`. Market ticker sourced from the upstream trading venue.
|
|
999
|
+
* @example will-trump-win-the-2024-election
|
|
1000
|
+
*/
|
|
1001
|
+
ticker: string;
|
|
1002
|
+
/** @description Market title */
|
|
1003
|
+
title?: string;
|
|
1004
|
+
/** @description Latest bid/ask prices for YES and NO sides. Only present when the request includes `expand=prices`. */
|
|
1005
|
+
prices?: components["schemas"]["CustomerMarketPrices"] | null;
|
|
1006
|
+
/**
|
|
1007
|
+
* @description Whether this market is accepting new positions
|
|
1008
|
+
* @example true
|
|
1009
|
+
*/
|
|
1010
|
+
accepting_new_positions: boolean;
|
|
1000
1011
|
/**
|
|
1001
1012
|
* @description ISO 8601 timestamp when market closes
|
|
1002
1013
|
* @example 2025-01-20T12:00:00.000Z
|
|
1003
1014
|
*/
|
|
1004
|
-
|
|
1015
|
+
close_time?: string;
|
|
1005
1016
|
/**
|
|
1006
|
-
* @description
|
|
1007
|
-
* @example
|
|
1008
|
-
* @enum {string}
|
|
1017
|
+
* @description ISO 8601 timestamp when this market was first discovered and listed on the platform
|
|
1018
|
+
* @example 2025-01-10T08:00:00.000Z
|
|
1009
1019
|
*/
|
|
1010
|
-
|
|
1020
|
+
discovered_at: string;
|
|
1011
1021
|
/**
|
|
1012
|
-
* @description
|
|
1013
|
-
* @example
|
|
1022
|
+
* @description ISO 8601 timestamp of the latest time a new position can be opened in this market
|
|
1023
|
+
* @example 2025-01-20T11:30:00.000Z
|
|
1024
|
+
*/
|
|
1025
|
+
latest_enter_at?: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* @description Minimum collateral amount formatted as USD
|
|
1028
|
+
* @example 0.02
|
|
1029
|
+
*/
|
|
1030
|
+
min_collateral_usd: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* @description Minimum collateral amount in USD pips (10000 pips = $1)
|
|
1033
|
+
* @example 200000
|
|
1034
|
+
*/
|
|
1035
|
+
min_collateral_usd_pips: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* @description Minimum notional amount formatted as USD
|
|
1038
|
+
* @example 5.00
|
|
1039
|
+
*/
|
|
1040
|
+
min_notional_usd: string;
|
|
1041
|
+
/**
|
|
1042
|
+
* @description Minimum notional amount in USD pips (10000 pips = $1)
|
|
1043
|
+
* @example 50000
|
|
1044
|
+
*/
|
|
1045
|
+
min_notional_usd_pips: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* @description Where this market sits on the road to settlement. `none` — still trading, nothing pending. `awaiting_resolution` — the market has closed and the outcome is decided, but the prediction market provider has not yet published the result on chain, so nothing can be redeemed yet. `settling` — the result is published and open positions are being settled. `voided` — the market was voided and every token pays out at $0.50. `unresolved_upstream` — the market disappeared from the provider before publishing a result and may never resolve.
|
|
1048
|
+
* @example none
|
|
1014
1049
|
* @enum {string}
|
|
1015
1050
|
*/
|
|
1016
1051
|
settlement_state: "awaiting_resolution" | "none" | "settling" | "unresolved_upstream" | "voided";
|
|
1017
1052
|
/**
|
|
1018
|
-
* @description
|
|
1019
|
-
* @example
|
|
1053
|
+
* @description Capacity-limited maximum notional for NO side formatted as USD
|
|
1054
|
+
* @example 50.00
|
|
1020
1055
|
*/
|
|
1021
|
-
|
|
1022
|
-
};
|
|
1023
|
-
CustomerOpenPosition: {
|
|
1024
|
-
/** @description Entry details */
|
|
1025
|
-
entry: components["schemas"]["CustomerPositionEntry"];
|
|
1026
|
-
/** @description Failure details if the position failed */
|
|
1027
|
-
failure?: components["schemas"]["CustomerPositionFailure"];
|
|
1056
|
+
capacity_max_notional_no_usd?: string | null;
|
|
1028
1057
|
/**
|
|
1029
|
-
* @description
|
|
1030
|
-
* @example
|
|
1058
|
+
* @description Capacity-limited maximum notional for NO side in USD pips (10000 pips = $1)
|
|
1059
|
+
* @example 500000000
|
|
1031
1060
|
*/
|
|
1032
|
-
|
|
1061
|
+
capacity_max_notional_no_usd_pips?: string | null;
|
|
1033
1062
|
/**
|
|
1034
|
-
* @description
|
|
1035
|
-
* @
|
|
1063
|
+
* @description Capacity-limited maximum notional for YES side formatted as USD
|
|
1064
|
+
* @example 50.00
|
|
1036
1065
|
*/
|
|
1037
|
-
|
|
1066
|
+
capacity_max_notional_yes_usd?: string | null;
|
|
1038
1067
|
/**
|
|
1039
|
-
* @description
|
|
1040
|
-
* @
|
|
1068
|
+
* @description Capacity-limited maximum notional for YES side in USD pips (10000 pips = $1)
|
|
1069
|
+
* @example 500000000
|
|
1041
1070
|
*/
|
|
1042
|
-
|
|
1071
|
+
capacity_max_notional_yes_usd_pips?: string | null;
|
|
1043
1072
|
/**
|
|
1044
|
-
* @description
|
|
1045
|
-
* @
|
|
1073
|
+
* @description Maximum notional available for NO side formatted as USD. Bounded by slippage, capacity, the partner's remaining position limit, and the per-user position limit (assuming a user with no open positions).
|
|
1074
|
+
* @example 50.00
|
|
1046
1075
|
*/
|
|
1047
|
-
|
|
1048
|
-
/** @description Inline unwind history. Only present when the request includes `expand=unwinds`; omitted otherwise. */
|
|
1049
|
-
unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
1050
|
-
/** @description Current position state */
|
|
1051
|
-
current: components["schemas"]["CustomerPositionCurrent"];
|
|
1052
|
-
/** @description Fee details for open position */
|
|
1053
|
-
fees: components["schemas"]["CustomerPositionOpenFees"];
|
|
1054
|
-
/** @description Risk metrics */
|
|
1055
|
-
risk: components["schemas"]["CustomerPositionRisk"];
|
|
1056
|
-
/** @description Timing information */
|
|
1057
|
-
timing: components["schemas"]["CustomerPositionTiming"];
|
|
1076
|
+
max_notional_no_usd?: string;
|
|
1058
1077
|
/**
|
|
1059
|
-
* @description
|
|
1060
|
-
* @example
|
|
1078
|
+
* @description Maximum notional available for NO side in USD pips (10000 pips = $1). Bounded by slippage, capacity, the partner's remaining position limit, and the per-user position limit (assuming a user with no open positions).
|
|
1079
|
+
* @example 500000000
|
|
1061
1080
|
*/
|
|
1062
|
-
|
|
1081
|
+
max_notional_no_usd_pips?: string;
|
|
1063
1082
|
/**
|
|
1064
|
-
* @description
|
|
1065
|
-
* @example
|
|
1083
|
+
* @description Maximum notional available for YES side formatted as USD. Bounded by slippage, capacity, the partner's remaining position limit, and the per-user position limit (assuming a user with no open positions).
|
|
1084
|
+
* @example 50.00
|
|
1066
1085
|
*/
|
|
1067
|
-
|
|
1068
|
-
/** @description Market title */
|
|
1069
|
-
market_title?: string;
|
|
1070
|
-
/** @description On-chain position key (bytes32) for requestClose", example: "0xabc123... */
|
|
1071
|
-
on_chain_position_key: string;
|
|
1086
|
+
max_notional_yes_usd?: string;
|
|
1072
1087
|
/**
|
|
1073
|
-
* @description
|
|
1074
|
-
* @example
|
|
1088
|
+
* @description Maximum notional available for YES side in USD pips (10000 pips = $1). Bounded by slippage, capacity, the partner's remaining position limit, and the per-user position limit (assuming a user with no open positions).
|
|
1089
|
+
* @example 500000000
|
|
1075
1090
|
*/
|
|
1076
|
-
|
|
1077
|
-
/** @description The committed-mode ladder this position was opened on: one row per planned unwind, each with a status of planned, triggered or superseded. Only present when the request includes `expand=planned_unwinds`; omitted otherwise, and empty on adaptive positions. */
|
|
1078
|
-
planned_unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
1091
|
+
max_notional_yes_usd_pips?: string;
|
|
1079
1092
|
/**
|
|
1080
|
-
* @
|
|
1081
|
-
* @
|
|
1093
|
+
* @description Slippage-limited maximum notional for NO side formatted as USD
|
|
1094
|
+
* @example 50.00
|
|
1082
1095
|
*/
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
|
|
1096
|
+
slippage_max_notional_no_usd?: string | null;
|
|
1097
|
+
/**
|
|
1098
|
+
* @description Slippage-limited maximum notional for NO side in USD pips (10000 pips = $1)
|
|
1099
|
+
* @example 500000000
|
|
1100
|
+
*/
|
|
1101
|
+
slippage_max_notional_no_usd_pips?: string | null;
|
|
1102
|
+
/**
|
|
1103
|
+
* @description Slippage-limited maximum notional for YES side formatted as USD
|
|
1104
|
+
* @example 50.00
|
|
1105
|
+
*/
|
|
1106
|
+
slippage_max_notional_yes_usd?: string | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* @description Slippage-limited maximum notional for YES side in USD pips (10000 pips = $1)
|
|
1109
|
+
* @example 500000000
|
|
1110
|
+
*/
|
|
1111
|
+
slippage_max_notional_yes_usd_pips?: string | null;
|
|
1112
|
+
/**
|
|
1113
|
+
* @description Reason code if market is not accepting new positions
|
|
1114
|
+
* @example QUOTE_MARKET_NOT_ELIGIBLE
|
|
1115
|
+
*/
|
|
1116
|
+
rejection_reason_code?: string;
|
|
1117
|
+
/** @description Per-side eligibility. A market may accept positions on one side while rejecting the other (e.g. thin opposite-side liquidity, side max-leverage below the floor). */
|
|
1118
|
+
sided_eligibility: components["schemas"]["CustomerSidedEligibility"];
|
|
1119
|
+
/** @description Subtitle for the YES outcome */
|
|
1120
|
+
yes_sub_title?: string;
|
|
1086
1121
|
};
|
|
1087
|
-
|
|
1122
|
+
CustomerOriginationFeeTier: {
|
|
1088
1123
|
/**
|
|
1089
|
-
* @description
|
|
1090
|
-
* @example
|
|
1124
|
+
* @description Upper leverage bound (inclusive) in basis points for this tier. The last tier is the catch-all.
|
|
1125
|
+
* @example 40000
|
|
1091
1126
|
*/
|
|
1092
|
-
|
|
1127
|
+
max_leverage_bps: number;
|
|
1128
|
+
/**
|
|
1129
|
+
* @description Protocol origination fee in basis points applied at or below this tier's leverage bound.
|
|
1130
|
+
* @example 200
|
|
1131
|
+
*/
|
|
1132
|
+
fee_bps: number;
|
|
1133
|
+
};
|
|
1134
|
+
CustomerFeeRatesMarket: {
|
|
1135
|
+
/**
|
|
1136
|
+
* @description Market ticker
|
|
1137
|
+
* @example TRUMP-2024-WIN
|
|
1138
|
+
*/
|
|
1139
|
+
ticker: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* @description Polymarket venue trading fee rate in basis points (`feeRateBps`).
|
|
1142
|
+
* @example 0
|
|
1143
|
+
*/
|
|
1144
|
+
polymarket_trading_fee_bps: number;
|
|
1145
|
+
/**
|
|
1146
|
+
* @description Polymarket fee-curve exponent (`feeExponent`). `1` for the standard quadratic curve.
|
|
1147
|
+
* @example 1
|
|
1148
|
+
*/
|
|
1149
|
+
polymarket_fee_exponent: number;
|
|
1150
|
+
};
|
|
1151
|
+
CustomerFeeRates: {
|
|
1152
|
+
/** @description Per-market venue fee fields. Only present when the request includes a `ticker` query parameter. */
|
|
1153
|
+
market?: components["schemas"]["CustomerFeeRatesMarket"];
|
|
1154
|
+
/** @description Leverage-tiered protocol origination fee schedule. Resolve a leverage to its fee by picking the first tier whose `maxLeverageBps >= leverageBps` (the last tier is the catch-all). */
|
|
1155
|
+
origination_fee_tiers: components["schemas"]["CustomerOriginationFeeTier"][];
|
|
1093
1156
|
/**
|
|
1094
|
-
* @
|
|
1095
|
-
* @
|
|
1096
|
-
* @example 100
|
|
1157
|
+
* @description Maximum combined (protocol + partner) origination fee in basis points enforced on-chain.
|
|
1158
|
+
* @example 1000
|
|
1097
1159
|
*/
|
|
1098
|
-
|
|
1160
|
+
contract_max_origination_fee_bps: number;
|
|
1099
1161
|
/**
|
|
1100
|
-
* @
|
|
1101
|
-
* @
|
|
1102
|
-
* @example 80
|
|
1162
|
+
* @description Lifetime fee APR in basis points
|
|
1163
|
+
* @example 2000
|
|
1103
1164
|
*/
|
|
1104
|
-
|
|
1165
|
+
lifetime_fee_apr_bps: number;
|
|
1105
1166
|
/**
|
|
1106
|
-
* @
|
|
1107
|
-
* @
|
|
1108
|
-
* @example 20
|
|
1167
|
+
* @description Liquidation fee in basis points
|
|
1168
|
+
* @example 250
|
|
1109
1169
|
*/
|
|
1110
|
-
|
|
1170
|
+
liquidation_fee_bps: number;
|
|
1111
1171
|
/**
|
|
1112
|
-
* @
|
|
1113
|
-
* @
|
|
1114
|
-
* @example 0.05
|
|
1172
|
+
* @description This partner's origination fee component in basis points, added to the protocol tier fee. `0` by default.
|
|
1173
|
+
* @example 0
|
|
1115
1174
|
*/
|
|
1116
|
-
|
|
1175
|
+
partner_origination_fee_bps: number;
|
|
1117
1176
|
/**
|
|
1118
|
-
* @
|
|
1119
|
-
* @
|
|
1120
|
-
* @example 500
|
|
1177
|
+
* @description This partner's Polymarket builder taker fee in basis points (flat percentage of notional). `0` by default.
|
|
1178
|
+
* @example 0
|
|
1121
1179
|
*/
|
|
1122
|
-
|
|
1180
|
+
partner_trading_fee_bps: number;
|
|
1181
|
+
};
|
|
1182
|
+
FeeReportBody: {
|
|
1123
1183
|
/**
|
|
1124
|
-
* @description
|
|
1125
|
-
* @example
|
|
1184
|
+
* @description Leverage in basis points (20000 = 2x, 100000 = 10x). Must be divisible by 2500. Maximum 10x.
|
|
1185
|
+
* @example 50000
|
|
1126
1186
|
*/
|
|
1127
|
-
|
|
1187
|
+
leverage_bps: number;
|
|
1128
1188
|
/**
|
|
1129
|
-
* @description
|
|
1130
|
-
* @example
|
|
1189
|
+
* @description Market ticker
|
|
1190
|
+
* @example TRUMP-2024-WIN
|
|
1131
1191
|
*/
|
|
1132
|
-
|
|
1192
|
+
market_ticker: string;
|
|
1133
1193
|
/**
|
|
1134
|
-
* @description
|
|
1135
|
-
* @example
|
|
1194
|
+
* @description Notional amount in USD pips (10,000 pips = $1.00)
|
|
1195
|
+
* @example 50000
|
|
1136
1196
|
*/
|
|
1137
|
-
|
|
1197
|
+
notional_amount_usd_pips: string;
|
|
1138
1198
|
/**
|
|
1139
|
-
* @description
|
|
1140
|
-
* @
|
|
1199
|
+
* @description Market side (yes or no)
|
|
1200
|
+
* @enum {string}
|
|
1141
1201
|
*/
|
|
1142
|
-
|
|
1202
|
+
effective_side: "yes" | "no";
|
|
1143
1203
|
/**
|
|
1144
|
-
* @description
|
|
1145
|
-
* @example
|
|
1204
|
+
* @description Effective-side entry price in USD pips (10000 pips = $1) to compute against. When omitted, the market's current reference price is used. Provide it to compute deterministically against a known price.
|
|
1205
|
+
* @example 5100
|
|
1146
1206
|
*/
|
|
1147
|
-
|
|
1207
|
+
entry_price_usd_pips?: string;
|
|
1208
|
+
};
|
|
1209
|
+
CustomerFeeReport: {
|
|
1148
1210
|
/**
|
|
1149
|
-
* @description
|
|
1150
|
-
* @example
|
|
1211
|
+
* @description Market ticker
|
|
1212
|
+
* @example TRUMP-2024-WIN
|
|
1151
1213
|
*/
|
|
1152
|
-
|
|
1153
|
-
};
|
|
1154
|
-
CustomerPositionResult: {
|
|
1214
|
+
market_ticker: string;
|
|
1155
1215
|
/**
|
|
1156
|
-
* @description
|
|
1157
|
-
* @
|
|
1216
|
+
* @description Market side
|
|
1217
|
+
* @enum {string}
|
|
1158
1218
|
*/
|
|
1159
|
-
|
|
1219
|
+
effective_side: "yes" | "no";
|
|
1160
1220
|
/**
|
|
1161
|
-
* @description
|
|
1162
|
-
* @example
|
|
1221
|
+
* @description Leverage in basis points (20000 = 2x)
|
|
1222
|
+
* @example 20000
|
|
1163
1223
|
*/
|
|
1164
|
-
|
|
1224
|
+
leverage_bps: number;
|
|
1165
1225
|
/**
|
|
1166
|
-
* @description
|
|
1167
|
-
* @example
|
|
1226
|
+
* @description Entry price used for the computation, in USD pips
|
|
1227
|
+
* @example 5100
|
|
1168
1228
|
*/
|
|
1169
|
-
|
|
1229
|
+
entry_price_usd_pips: string;
|
|
1170
1230
|
/**
|
|
1171
|
-
* @description
|
|
1172
|
-
* @example
|
|
1231
|
+
* @description Notional in USD pips (10000 pips = $1)
|
|
1232
|
+
* @example 500000
|
|
1173
1233
|
*/
|
|
1174
|
-
|
|
1234
|
+
notional_amount_usd_pips: string;
|
|
1175
1235
|
/**
|
|
1176
|
-
* @description
|
|
1177
|
-
* @example
|
|
1236
|
+
* @description Notional in USDC units (1,000,000 = 1 USDC)
|
|
1237
|
+
* @example 50000000
|
|
1178
1238
|
*/
|
|
1179
|
-
|
|
1239
|
+
notional_usdc_units: string;
|
|
1180
1240
|
/**
|
|
1181
|
-
* @description
|
|
1182
|
-
* @example
|
|
1241
|
+
* @description Collateral in USDC units
|
|
1242
|
+
* @example 25000000
|
|
1183
1243
|
*/
|
|
1184
|
-
|
|
1244
|
+
collateral_usdc_units: string;
|
|
1185
1245
|
/**
|
|
1186
|
-
* @description
|
|
1187
|
-
* @example
|
|
1246
|
+
* @description Combined origination fee in basis points
|
|
1247
|
+
* @example 200
|
|
1188
1248
|
*/
|
|
1189
|
-
|
|
1249
|
+
origination_fee_bps: number;
|
|
1190
1250
|
/**
|
|
1191
|
-
* @description
|
|
1192
|
-
* @example
|
|
1251
|
+
* @description Origination fee in USDC units
|
|
1252
|
+
* @example 1000000
|
|
1193
1253
|
*/
|
|
1194
|
-
|
|
1254
|
+
origination_fee_usdc_units: string;
|
|
1195
1255
|
/**
|
|
1196
|
-
* @description
|
|
1197
|
-
* @example
|
|
1256
|
+
* @description Protocol component of the origination fee in basis points
|
|
1257
|
+
* @example 200
|
|
1198
1258
|
*/
|
|
1199
|
-
|
|
1259
|
+
protocol_origination_fee_bps: number;
|
|
1200
1260
|
/**
|
|
1201
|
-
* @description
|
|
1202
|
-
* @example
|
|
1261
|
+
* @description Partner component of the origination fee in basis points
|
|
1262
|
+
* @example 0
|
|
1203
1263
|
*/
|
|
1204
|
-
|
|
1264
|
+
partner_origination_fee_bps: number;
|
|
1205
1265
|
/**
|
|
1206
|
-
* @description
|
|
1207
|
-
* @example
|
|
1266
|
+
* @description Polymarket venue trading fee rate in basis points (`feeRateBps`).
|
|
1267
|
+
* @example 0
|
|
1208
1268
|
*/
|
|
1209
|
-
|
|
1269
|
+
polymarket_trading_fee_bps: number;
|
|
1210
1270
|
/**
|
|
1211
|
-
* @description
|
|
1212
|
-
* @example
|
|
1271
|
+
* @description Partner Polymarket builder taker fee in basis points (flat percentage of notional).
|
|
1272
|
+
* @example 0
|
|
1213
1273
|
*/
|
|
1214
|
-
|
|
1274
|
+
partner_trading_fee_bps: number;
|
|
1215
1275
|
/**
|
|
1216
|
-
* @description
|
|
1217
|
-
* @example
|
|
1276
|
+
* @description Expected venue trading fee in USDC units charged to open the position (protocol venue fee + partner builder fee), computed from notional and entry price.
|
|
1277
|
+
* @example 2204118
|
|
1218
1278
|
*/
|
|
1219
|
-
|
|
1279
|
+
expected_open_trading_fee_usdc_units: string;
|
|
1220
1280
|
/**
|
|
1221
|
-
* @description
|
|
1222
|
-
* @example
|
|
1281
|
+
* @description Total amount the user must provide to open, in USDC units.
|
|
1282
|
+
* @example 28204118
|
|
1223
1283
|
*/
|
|
1224
|
-
|
|
1225
|
-
};
|
|
1226
|
-
CustomerClosedPosition: {
|
|
1227
|
-
/** @description Entry details */
|
|
1228
|
-
entry: components["schemas"]["CustomerPositionEntry"];
|
|
1229
|
-
/** @description Failure details if the position failed */
|
|
1230
|
-
failure?: components["schemas"]["CustomerPositionFailure"];
|
|
1284
|
+
total_user_amount_usdc_units: string;
|
|
1231
1285
|
/**
|
|
1232
|
-
* @description
|
|
1233
|
-
* @example
|
|
1286
|
+
* @description Deterministic at-entry liquidation price ESTIMATE in USD pips (10000 pips = $1): `entry * (L-1)/L * (1 + liquidationFeeBps/10000)`. This is a closed-form estimate; the binding offer uses a TWAP/inference-based price that may differ.
|
|
1287
|
+
* @example 2629
|
|
1234
1288
|
*/
|
|
1235
|
-
|
|
1289
|
+
estimated_liquidation_price_usd_pips: string;
|
|
1236
1290
|
/**
|
|
1237
|
-
* @description
|
|
1238
|
-
* @
|
|
1291
|
+
* @description Gross maximum gain in USDC units: full value on a win (settlement at $1) minus notional, before fees. Profit over principal; may be negative.
|
|
1292
|
+
* @example 48039215
|
|
1239
1293
|
*/
|
|
1240
|
-
|
|
1294
|
+
gross_max_gain_usdc_units: string;
|
|
1241
1295
|
/**
|
|
1242
|
-
* @description
|
|
1243
|
-
* @
|
|
1296
|
+
* @description Net maximum gain in USDC units: grossMaxGain minus the open trading fee and the origination fee. Assumes a win via settlement (no exit trading fee) and excludes lifetime fees, so it is an upper bound. May be negative.
|
|
1297
|
+
* @example 44835097
|
|
1244
1298
|
*/
|
|
1245
|
-
|
|
1299
|
+
net_max_gain_usdc_units: string;
|
|
1300
|
+
};
|
|
1301
|
+
CustomerLimit: {
|
|
1246
1302
|
/**
|
|
1247
|
-
* @description
|
|
1248
|
-
* @
|
|
1303
|
+
* @description Total limit formatted as USD
|
|
1304
|
+
* @example 1000.00
|
|
1249
1305
|
*/
|
|
1250
|
-
|
|
1251
|
-
/** @description Inline unwind history. Only present when the request includes `expand=unwinds`; omitted otherwise. */
|
|
1252
|
-
unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
1253
|
-
/** @description Fee details for closed position */
|
|
1254
|
-
fees: components["schemas"]["CustomerPositionClosedFees"];
|
|
1255
|
-
/** @description Position result/outcome */
|
|
1256
|
-
result: components["schemas"]["CustomerPositionResult"];
|
|
1306
|
+
limit_usd: string;
|
|
1257
1307
|
/**
|
|
1258
|
-
* @description
|
|
1259
|
-
* @example
|
|
1308
|
+
* @description Total limit in USD pips (10000 pips = $1)
|
|
1309
|
+
* @example 10000000
|
|
1260
1310
|
*/
|
|
1261
|
-
|
|
1311
|
+
limit_usd_pips: string;
|
|
1262
1312
|
/**
|
|
1263
|
-
* @description
|
|
1264
|
-
* @example
|
|
1313
|
+
* @description Remaining available limit formatted as USD
|
|
1314
|
+
* @example 750.00
|
|
1265
1315
|
*/
|
|
1266
|
-
|
|
1267
|
-
/** @description Market title */
|
|
1268
|
-
market_title?: string;
|
|
1269
|
-
/** @description On-chain position key (bytes32) for requestClose", example: "0xabc123... */
|
|
1270
|
-
on_chain_position_key: string;
|
|
1316
|
+
remaining_usd: string;
|
|
1271
1317
|
/**
|
|
1272
|
-
* @description
|
|
1273
|
-
* @example
|
|
1318
|
+
* @description Remaining available limit in USD pips
|
|
1319
|
+
* @example 7500000
|
|
1274
1320
|
*/
|
|
1275
|
-
|
|
1276
|
-
/** @description The committed-mode ladder this position was opened on: one row per planned unwind, each with a status of planned, triggered or superseded. Only present when the request includes `expand=planned_unwinds`; omitted otherwise, and empty on adaptive positions. */
|
|
1277
|
-
planned_unwinds?: components["schemas"]["CustomerPositionUnwindList"] | null;
|
|
1321
|
+
remaining_usd_pips: string;
|
|
1278
1322
|
/**
|
|
1279
|
-
* @description
|
|
1280
|
-
* @
|
|
1323
|
+
* @description Current usage formatted as USD
|
|
1324
|
+
* @example 250.00
|
|
1281
1325
|
*/
|
|
1282
|
-
|
|
1326
|
+
usage_usd: string;
|
|
1283
1327
|
/**
|
|
1284
|
-
* @description
|
|
1285
|
-
* @
|
|
1328
|
+
* @description Current usage in USD pips
|
|
1329
|
+
* @example 2500000
|
|
1286
1330
|
*/
|
|
1287
|
-
|
|
1331
|
+
usage_usd_pips: string;
|
|
1288
1332
|
};
|
|
1289
1333
|
CustomerPartialClose: {
|
|
1290
1334
|
/**
|
|
@@ -1455,22 +1499,17 @@ interface components {
|
|
|
1455
1499
|
*/
|
|
1456
1500
|
risk_mode: "adaptive" | "committed";
|
|
1457
1501
|
};
|
|
1458
|
-
CommittedUnwindUnavailableReason: {
|
|
1459
|
-
/**
|
|
1460
|
-
* @description Machine-readable reason committed mode cannot be offered for this quote
|
|
1461
|
-
* @example cryptoMarket
|
|
1462
|
-
* @enum {string}
|
|
1463
|
-
*/
|
|
1464
|
-
code: "cryptoMarket" | "illegibleMarginTooLarge" | "illegibleTooManyUnwinds" | "invertedRiskBands" | "lateGameSoccer" | "notOfferedOnDeskQuotes";
|
|
1465
|
-
/** @description Human-readable explanation of the same reason */
|
|
1466
|
-
message: string;
|
|
1467
|
-
};
|
|
1468
1502
|
PlannedUnwind: {
|
|
1469
1503
|
/**
|
|
1470
1504
|
* @description Order in which this unwind fires, starting at 0
|
|
1471
1505
|
* @example 0
|
|
1472
1506
|
*/
|
|
1473
1507
|
sequence: number;
|
|
1508
|
+
/**
|
|
1509
|
+
* @description Price at which this unwind fires, formatted as USD
|
|
1510
|
+
* @example 0.42
|
|
1511
|
+
*/
|
|
1512
|
+
trigger_price_usd: string;
|
|
1474
1513
|
/**
|
|
1475
1514
|
* @description Price at which this unwind fires, in USD pips (10000 pips = $1)
|
|
1476
1515
|
* @example 4200
|
|
@@ -1481,28 +1520,41 @@ interface components {
|
|
|
1481
1520
|
* @example 15000
|
|
1482
1521
|
*/
|
|
1483
1522
|
target_leverage_bps: number;
|
|
1523
|
+
/**
|
|
1524
|
+
* @description Estimated whole tokens sold to reach the target. An estimate only — the executed amount depends on the fill.
|
|
1525
|
+
* @example 30
|
|
1526
|
+
*/
|
|
1527
|
+
estimated_sell_tokens: string;
|
|
1484
1528
|
/**
|
|
1485
1529
|
* @description Estimated token units sold to reach the target (1000000 units = 1 token). An estimate only — the executed amount depends on the fill.
|
|
1486
1530
|
* @example 30000000
|
|
1487
1531
|
*/
|
|
1488
|
-
|
|
1532
|
+
estimated_sell_token_units: string;
|
|
1489
1533
|
};
|
|
1490
1534
|
CommittedUnwinds: {
|
|
1491
1535
|
/** @description Whether committed mode can be offered for this quote */
|
|
1492
1536
|
available: boolean;
|
|
1493
|
-
/**
|
|
1494
|
-
|
|
1537
|
+
/**
|
|
1538
|
+
* @description Extra margin the user must post on top of collateral, formatted as USD
|
|
1539
|
+
* @example 67.00
|
|
1540
|
+
*/
|
|
1541
|
+
margin_required_usd?: string | null;
|
|
1495
1542
|
/**
|
|
1496
1543
|
* @description Extra margin the user must post on top of collateral, in USDC units (1000000 units = 1 USDC)
|
|
1497
1544
|
* @example 67000000
|
|
1498
1545
|
*/
|
|
1499
1546
|
margin_required_usdc_units?: string | null;
|
|
1547
|
+
/**
|
|
1548
|
+
* @description Price at which selling the remaining tokens repays the loan in full, formatted as USD
|
|
1549
|
+
* @example 0.27
|
|
1550
|
+
*/
|
|
1551
|
+
debt_clear_price_usd?: string | null;
|
|
1500
1552
|
/**
|
|
1501
1553
|
* @description Price at which selling the remaining tokens repays the loan in full, in USD pips
|
|
1502
1554
|
* @example 2700
|
|
1503
1555
|
*/
|
|
1504
1556
|
debt_clear_price_usd_pips?: string | null;
|
|
1505
|
-
/** @description The pre-committed unwinds, in the order they fire.
|
|
1557
|
+
/** @description The pre-committed unwinds, in the order they fire. Null when committed mode is unavailable. */
|
|
1506
1558
|
planned_unwinds?: components["schemas"]["PlannedUnwind"][] | null;
|
|
1507
1559
|
};
|
|
1508
1560
|
CustomerOfferMaxGain: {
|
|
@@ -1588,6 +1640,12 @@ interface components {
|
|
|
1588
1640
|
* @example 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
|
|
1589
1641
|
*/
|
|
1590
1642
|
polymarket_market_id: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* @description Which Polymarket share ledger the market uses, numbered as the vault numbers it: 1 = Conditional Tokens (CTF), 2 = Polymarket Protocol V2 (PositionManager). Pass it as `protocolVersion` to the vault. A version 2 quote is signed for `createPositionWithVersion` / `createPositionWithMarginAndVersion` (or their push-funded twins) and is rejected by the create functions without a version.
|
|
1645
|
+
* @example 1
|
|
1646
|
+
* @enum {number}
|
|
1647
|
+
*/
|
|
1648
|
+
polymarket_protocol_version: 1 | 2;
|
|
1591
1649
|
/** @description EIP-191 signature for contract create position */
|
|
1592
1650
|
contract_signature: string;
|
|
1593
1651
|
/**
|
|
@@ -1600,20 +1658,19 @@ interface components {
|
|
|
1600
1658
|
* @example 0x1234567890123456789012345678901234567890
|
|
1601
1659
|
*/
|
|
1602
1660
|
polygon_vault_contract_address: string;
|
|
1603
|
-
/**
|
|
1604
|
-
* @description Vault function this quote's signature authorizes. createPositionWithMargin for committed quotes, createPosition otherwise. A signature for one will not authorize the other.
|
|
1605
|
-
* @example createPosition
|
|
1606
|
-
* @enum {string}
|
|
1607
|
-
*/
|
|
1608
|
-
polygon_vault_function_name: "createPosition" | "createPositionWithMargin";
|
|
1609
1661
|
/**
|
|
1610
1662
|
* @description Risk mode this quote was issued in. A committed request is answered in committed mode or rejected, so this only reports adaptive when adaptive was asked for.
|
|
1611
1663
|
* @example adaptive
|
|
1612
1664
|
* @enum {string}
|
|
1613
1665
|
*/
|
|
1614
1666
|
risk_mode: "adaptive" | "committed";
|
|
1615
|
-
/** @description Committed-unwind mode for this quote: the pre-committed unwinds and the extra margin they require, or
|
|
1667
|
+
/** @description Committed-unwind mode for this quote: the pre-committed unwinds and the extra margin they require, or whether the mode can be offered at all. */
|
|
1616
1668
|
committed_unwinds?: components["schemas"]["CommittedUnwinds"];
|
|
1669
|
+
/**
|
|
1670
|
+
* @description Extra margin locked in the vault on top of collateral, formatted as USD. Zero on adaptive quotes.
|
|
1671
|
+
* @example 0.00
|
|
1672
|
+
*/
|
|
1673
|
+
margin_usd: string;
|
|
1617
1674
|
/**
|
|
1618
1675
|
* @description Extra margin locked in the vault on top of collateral, in USDC units (1,000,000 units = 1 USDC). Zero on adaptive quotes. Included in totalUserAmountUsdcUnits.
|
|
1619
1676
|
* @example 0
|