@siebly/kraken-api 1.0.4 → 1.0.5

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.
@@ -273,6 +273,93 @@ export interface PartnerGetRampProspectiveQuoteParams {
273
273
  funding_type: string;
274
274
  withdrawal_method: string;
275
275
  }
276
+ /**
277
+ * Embed Custom Orders - Create Custom Order request parameters
278
+ * Price-triggered custom orders. User in query, body has trigger, action, name.
279
+ */
280
+ export interface PartnerCreateCustomOrderParams {
281
+ user: string;
282
+ trigger: {
283
+ type: 'price';
284
+ base_asset: string;
285
+ quote_asset: string;
286
+ target_price: string;
287
+ condition: 'gte' | 'lte';
288
+ };
289
+ action: {
290
+ type: 'receive' | 'spend';
291
+ amount: {
292
+ asset_class?: 'currency';
293
+ asset: string;
294
+ amount: string;
295
+ };
296
+ quote: {
297
+ asset: string;
298
+ fee_bps: string;
299
+ spread_bps: string;
300
+ };
301
+ };
302
+ name: string;
303
+ }
304
+ /**
305
+ * Embed Custom Orders - List Custom Orders request parameters
306
+ */
307
+ export interface PartnerListCustomOrdersParams {
308
+ user: string;
309
+ statuses?: Array<'active' | 'cancelled' | 'completed'>;
310
+ cursor?: string;
311
+ }
312
+ /**
313
+ * Embed Custom Orders - Get Custom Order request parameters
314
+ */
315
+ export interface PartnerGetCustomOrderParams {
316
+ user: string;
317
+ order_id: string;
318
+ }
319
+ /**
320
+ * Embed Custom Orders - Cancel Custom Order request parameters
321
+ */
322
+ export interface PartnerCancelCustomOrderParams {
323
+ user: string;
324
+ id: string;
325
+ }
326
+ /**
327
+ * Embed Quotes (RFQ) - Get Quote Limits request parameters
328
+ */
329
+ export interface PartnerGetQuoteLimitsParams {
330
+ user: string;
331
+ base_asset: string;
332
+ quote_asset: string;
333
+ type: 'receive' | 'spend';
334
+ quote_currency?: string;
335
+ }
336
+ /**
337
+ * Embed Quotes (RFQ) - Request Prospective Quote request parameters
338
+ */
339
+ export interface PartnerRequestProspectiveQuoteParams {
340
+ user: string;
341
+ action: {
342
+ type: 'receive' | 'spend';
343
+ amount: {
344
+ asset_class?: 'currency';
345
+ asset: string;
346
+ amount: string;
347
+ };
348
+ quote: {
349
+ asset: string;
350
+ fee_bps: string;
351
+ spread_bps: string;
352
+ };
353
+ };
354
+ trigger?: {
355
+ type: 'price';
356
+ base_asset: string;
357
+ quote_asset: string;
358
+ target_price: string;
359
+ condition: 'gte' | 'lte';
360
+ };
361
+ quote_currency?: string;
362
+ }
276
363
  /**
277
364
  * Get Ramp Checkout URL request parameters
278
365
  */
@@ -330,3 +330,126 @@ export interface PartnerGetRampCheckoutUrlResponse {
330
330
  request_data: any;
331
331
  };
332
332
  }
333
+ /** Shared price trigger for custom orders (Embed) */
334
+ export interface PartnerCustomOrderPriceTrigger {
335
+ type: 'price';
336
+ base_asset: string;
337
+ quote_asset: string;
338
+ target_price: string;
339
+ condition: 'gte' | 'lte';
340
+ }
341
+ /** Shared action object for custom orders (Embed) */
342
+ export interface PartnerCustomOrderAction {
343
+ type: 'receive' | 'spend';
344
+ amount: {
345
+ asset_class?: 'currency';
346
+ asset: string;
347
+ amount: string;
348
+ };
349
+ quote: {
350
+ asset: string;
351
+ fee_bps: string;
352
+ spread_bps: string;
353
+ };
354
+ }
355
+ /** Single custom order in responses */
356
+ export interface PartnerCustomOrder {
357
+ id: string;
358
+ name: string;
359
+ action: PartnerCustomOrderAction;
360
+ trigger: PartnerCustomOrderPriceTrigger;
361
+ created_at: string;
362
+ updated_at: string;
363
+ status: {
364
+ status: 'active';
365
+ } | {
366
+ status: 'completed';
367
+ } | {
368
+ status: 'cancelled';
369
+ } | {
370
+ status: 'paused';
371
+ };
372
+ }
373
+ /**
374
+ * Create Custom Order response
375
+ */
376
+ export interface PartnerCreateCustomOrderResponse {
377
+ result?: {
378
+ order: PartnerCustomOrder;
379
+ };
380
+ }
381
+ /**
382
+ * List Custom Orders response
383
+ */
384
+ export interface PartnerListCustomOrdersResponse {
385
+ result?: {
386
+ orders: PartnerCustomOrder[];
387
+ next_cursor?: string;
388
+ };
389
+ }
390
+ /**
391
+ * Get Custom Order response
392
+ */
393
+ export interface PartnerGetCustomOrderResponse {
394
+ result?: {
395
+ order: PartnerCustomOrder;
396
+ };
397
+ }
398
+ /**
399
+ * Cancel Custom Order response
400
+ */
401
+ export interface PartnerCancelCustomOrderResponse {
402
+ result?: {
403
+ order: PartnerCustomOrder;
404
+ };
405
+ }
406
+ /** Asset amount object used in quote limits/limits response */
407
+ export interface PartnerQuoteLimitAmount {
408
+ asset: string;
409
+ amount: string;
410
+ }
411
+ /**
412
+ * Get Quote Limits response (RFQ)
413
+ */
414
+ export interface PartnerGetQuoteLimitsResponse {
415
+ result?: {
416
+ asset: string;
417
+ minimum: string;
418
+ maximum: string;
419
+ precision: number;
420
+ minimum_tradable_amount?: string | null;
421
+ minimum_in_display?: PartnerQuoteLimitAmount | null;
422
+ maximum_in_display?: PartnerQuoteLimitAmount | null;
423
+ minimum_tradable_amount_in_display?: PartnerQuoteLimitAmount | null;
424
+ };
425
+ }
426
+ /** Spend/receive breakdown in prospective quote */
427
+ export interface PartnerProspectiveQuoteBreakdown {
428
+ asset: string;
429
+ asset_class?: 'currency' | null;
430
+ total: string;
431
+ fee: string;
432
+ subtotal: string;
433
+ }
434
+ /** Unit price in prospective quote */
435
+ export interface PartnerProspectiveQuoteUnitPrice {
436
+ asset: string;
437
+ asset_class?: 'currency' | null;
438
+ unit_price: string;
439
+ denomination_asset: string;
440
+ denomination_asset_class?: 'currency' | null;
441
+ }
442
+ /**
443
+ * Request Prospective Quote response (RFQ)
444
+ */
445
+ export interface PartnerRequestProspectiveQuoteResponse {
446
+ result?: {
447
+ type: 'receive' | 'spend';
448
+ spend: PartnerProspectiveQuoteBreakdown;
449
+ receive: PartnerProspectiveQuoteBreakdown;
450
+ unit_price: PartnerProspectiveQuoteUnitPrice;
451
+ quoted_spend?: PartnerProspectiveQuoteBreakdown | null;
452
+ quoted_receive?: PartnerProspectiveQuoteBreakdown | null;
453
+ quoted_unit_price?: PartnerProspectiveQuoteUnitPrice | null;
454
+ };
455
+ }