@crypticdot/defituna-api 1.4.1 → 1.4.3

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/dist/index.d.mts CHANGED
@@ -1589,8 +1589,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1589
1589
  authority: z.ZodString;
1590
1590
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
1591
1591
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
1592
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
1593
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
1594
1592
  aToB: z.ZodBoolean;
1595
1593
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
1596
1594
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -1662,8 +1660,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1662
1660
  ts: Date;
1663
1661
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
1664
1662
  isReduceOnly: boolean | null;
1665
- uiTakeProfitPrice: number | null;
1666
- uiStopLossPrice: number | null;
1667
1663
  uiExecutionPrice: number | null;
1668
1664
  baseTokenConsumedAmount: {
1669
1665
  amount: bigint;
@@ -1695,8 +1691,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1695
1691
  ts: Date;
1696
1692
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
1697
1693
  isReduceOnly: boolean | null;
1698
- uiTakeProfitPrice: number | null;
1699
- uiStopLossPrice: number | null;
1700
1694
  uiExecutionPrice: number | null;
1701
1695
  baseTokenConsumedAmount: {
1702
1696
  amount: bigint;
@@ -5149,8 +5143,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5149
5143
  authority: z.ZodString;
5150
5144
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
5151
5145
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
5152
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
5153
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
5154
5146
  aToB: z.ZodBoolean;
5155
5147
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
5156
5148
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -5222,8 +5214,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5222
5214
  ts: Date;
5223
5215
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5224
5216
  isReduceOnly: boolean | null;
5225
- uiTakeProfitPrice: number | null;
5226
- uiStopLossPrice: number | null;
5227
5217
  uiExecutionPrice: number | null;
5228
5218
  baseTokenConsumedAmount: {
5229
5219
  amount: bigint;
@@ -5255,8 +5245,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5255
5245
  ts: Date;
5256
5246
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5257
5247
  isReduceOnly: boolean | null;
5258
- uiTakeProfitPrice: number | null;
5259
- uiStopLossPrice: number | null;
5260
5248
  uiExecutionPrice: number | null;
5261
5249
  baseTokenConsumedAmount: {
5262
5250
  amount: bigint;
@@ -5279,8 +5267,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5279
5267
  authority: z.ZodString;
5280
5268
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
5281
5269
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
5282
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
5283
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
5284
5270
  aToB: z.ZodBoolean;
5285
5271
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
5286
5272
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -5352,8 +5338,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5352
5338
  ts: Date;
5353
5339
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5354
5340
  isReduceOnly: boolean | null;
5355
- uiTakeProfitPrice: number | null;
5356
- uiStopLossPrice: number | null;
5357
5341
  uiExecutionPrice: number | null;
5358
5342
  baseTokenConsumedAmount: {
5359
5343
  amount: bigint;
@@ -5385,8 +5369,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5385
5369
  ts: Date;
5386
5370
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5387
5371
  isReduceOnly: boolean | null;
5388
- uiTakeProfitPrice: number | null;
5389
- uiStopLossPrice: number | null;
5390
5372
  uiExecutionPrice: number | null;
5391
5373
  baseTokenConsumedAmount: {
5392
5374
  amount: bigint;
@@ -5425,8 +5407,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5425
5407
  ts: Date;
5426
5408
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5427
5409
  isReduceOnly: boolean | null;
5428
- uiTakeProfitPrice: number | null;
5429
- uiStopLossPrice: number | null;
5430
5410
  uiExecutionPrice: number | null;
5431
5411
  baseTokenConsumedAmount: {
5432
5412
  amount: bigint;
@@ -5465,8 +5445,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5465
5445
  ts: Date;
5466
5446
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5467
5447
  isReduceOnly: boolean | null;
5468
- uiTakeProfitPrice: number | null;
5469
- uiStopLossPrice: number | null;
5470
5448
  uiExecutionPrice: number | null;
5471
5449
  baseTokenConsumedAmount: {
5472
5450
  amount: bigint;
@@ -5505,8 +5483,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5505
5483
  ts: Date;
5506
5484
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5507
5485
  isReduceOnly: boolean | null;
5508
- uiTakeProfitPrice: number | null;
5509
- uiStopLossPrice: number | null;
5510
5486
  uiExecutionPrice: number | null;
5511
5487
  baseTokenConsumedAmount: {
5512
5488
  amount: bigint;
@@ -5545,8 +5521,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5545
5521
  ts: Date;
5546
5522
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5547
5523
  isReduceOnly: boolean | null;
5548
- uiTakeProfitPrice: number | null;
5549
- uiStopLossPrice: number | null;
5550
5524
  uiExecutionPrice: number | null;
5551
5525
  baseTokenConsumedAmount: {
5552
5526
  amount: bigint;
@@ -6204,6 +6178,7 @@ type GetUserTradeHistoryOptions = {
6204
6178
  type GetUserOrderHistoryOptions = {
6205
6179
  pool?: string[];
6206
6180
  orderType?: OrderHistoryOrderTypeType[];
6181
+ uiDiretion?: OrderHistoryUIDirectionType[];
6207
6182
  cursor?: string;
6208
6183
  limit?: number;
6209
6184
  desc?: boolean;
package/dist/index.d.ts CHANGED
@@ -1589,8 +1589,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1589
1589
  authority: z.ZodString;
1590
1590
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
1591
1591
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
1592
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
1593
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
1594
1592
  aToB: z.ZodBoolean;
1595
1593
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
1596
1594
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -1662,8 +1660,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1662
1660
  ts: Date;
1663
1661
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
1664
1662
  isReduceOnly: boolean | null;
1665
- uiTakeProfitPrice: number | null;
1666
- uiStopLossPrice: number | null;
1667
1663
  uiExecutionPrice: number | null;
1668
1664
  baseTokenConsumedAmount: {
1669
1665
  amount: bigint;
@@ -1695,8 +1691,6 @@ declare const OrderHistoryEntry$1: z.ZodObject<{
1695
1691
  ts: Date;
1696
1692
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
1697
1693
  isReduceOnly: boolean | null;
1698
- uiTakeProfitPrice: number | null;
1699
- uiStopLossPrice: number | null;
1700
1694
  uiExecutionPrice: number | null;
1701
1695
  baseTokenConsumedAmount: {
1702
1696
  amount: bigint;
@@ -5149,8 +5143,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5149
5143
  authority: z.ZodString;
5150
5144
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
5151
5145
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
5152
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
5153
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
5154
5146
  aToB: z.ZodBoolean;
5155
5147
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
5156
5148
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -5222,8 +5214,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5222
5214
  ts: Date;
5223
5215
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5224
5216
  isReduceOnly: boolean | null;
5225
- uiTakeProfitPrice: number | null;
5226
- uiStopLossPrice: number | null;
5227
5217
  uiExecutionPrice: number | null;
5228
5218
  baseTokenConsumedAmount: {
5229
5219
  amount: bigint;
@@ -5255,8 +5245,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5255
5245
  ts: Date;
5256
5246
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5257
5247
  isReduceOnly: boolean | null;
5258
- uiTakeProfitPrice: number | null;
5259
- uiStopLossPrice: number | null;
5260
5248
  uiExecutionPrice: number | null;
5261
5249
  baseTokenConsumedAmount: {
5262
5250
  amount: bigint;
@@ -5279,8 +5267,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5279
5267
  authority: z.ZodString;
5280
5268
  orderType: z.ZodEnum<["market", ...("market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market")[]]>;
5281
5269
  isReduceOnly: z.ZodNullable<z.ZodBoolean>;
5282
- uiTakeProfitPrice: z.ZodNullable<z.ZodNumber>;
5283
- uiStopLossPrice: z.ZodNullable<z.ZodNumber>;
5284
5270
  aToB: z.ZodBoolean;
5285
5271
  uiDirection: z.ZodEnum<["buy", ...("buy" | "sell" | "long" | "short")[]]>;
5286
5272
  uiPrice: z.ZodNullable<z.ZodNumber>;
@@ -5352,8 +5338,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5352
5338
  ts: Date;
5353
5339
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5354
5340
  isReduceOnly: boolean | null;
5355
- uiTakeProfitPrice: number | null;
5356
- uiStopLossPrice: number | null;
5357
5341
  uiExecutionPrice: number | null;
5358
5342
  baseTokenConsumedAmount: {
5359
5343
  amount: bigint;
@@ -5385,8 +5369,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5385
5369
  ts: Date;
5386
5370
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5387
5371
  isReduceOnly: boolean | null;
5388
- uiTakeProfitPrice: number | null;
5389
- uiStopLossPrice: number | null;
5390
5372
  uiExecutionPrice: number | null;
5391
5373
  baseTokenConsumedAmount: {
5392
5374
  amount: bigint;
@@ -5425,8 +5407,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5425
5407
  ts: Date;
5426
5408
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5427
5409
  isReduceOnly: boolean | null;
5428
- uiTakeProfitPrice: number | null;
5429
- uiStopLossPrice: number | null;
5430
5410
  uiExecutionPrice: number | null;
5431
5411
  baseTokenConsumedAmount: {
5432
5412
  amount: bigint;
@@ -5465,8 +5445,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5465
5445
  ts: Date;
5466
5446
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5467
5447
  isReduceOnly: boolean | null;
5468
- uiTakeProfitPrice: number | null;
5469
- uiStopLossPrice: number | null;
5470
5448
  uiExecutionPrice: number | null;
5471
5449
  baseTokenConsumedAmount: {
5472
5450
  amount: bigint;
@@ -5505,8 +5483,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5505
5483
  ts: Date;
5506
5484
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5507
5485
  isReduceOnly: boolean | null;
5508
- uiTakeProfitPrice: number | null;
5509
- uiStopLossPrice: number | null;
5510
5486
  uiExecutionPrice: number | null;
5511
5487
  baseTokenConsumedAmount: {
5512
5488
  amount: bigint;
@@ -5545,8 +5521,6 @@ declare const OrderHistoryEntryNotification: z.ZodObject<{
5545
5521
  ts: Date;
5546
5522
  orderType: "market" | "limit" | "take_profit_market" | "stop_loss_market" | "liquidation_market";
5547
5523
  isReduceOnly: boolean | null;
5548
- uiTakeProfitPrice: number | null;
5549
- uiStopLossPrice: number | null;
5550
5524
  uiExecutionPrice: number | null;
5551
5525
  baseTokenConsumedAmount: {
5552
5526
  amount: bigint;
@@ -6204,6 +6178,7 @@ type GetUserTradeHistoryOptions = {
6204
6178
  type GetUserOrderHistoryOptions = {
6205
6179
  pool?: string[];
6206
6180
  orderType?: OrderHistoryOrderTypeType[];
6181
+ uiDiretion?: OrderHistoryUIDirectionType[];
6207
6182
  cursor?: string;
6208
6183
  limit?: number;
6209
6184
  desc?: boolean;
package/dist/index.js CHANGED
@@ -531,8 +531,6 @@ var OrderHistoryEntry = import_zod.z.object({
531
531
  authority: import_zod.z.string(),
532
532
  orderType: OrderHistoryOrderTypeSchema,
533
533
  isReduceOnly: import_zod.z.nullable(import_zod.z.boolean()),
534
- uiTakeProfitPrice: import_zod.z.nullable(import_zod.z.number()),
535
- uiStopLossPrice: import_zod.z.nullable(import_zod.z.number()),
536
534
  aToB: import_zod.z.boolean(),
537
535
  uiDirection: OrderHistoryUIDirectionSchema,
538
536
  uiPrice: import_zod.z.nullable(import_zod.z.number()),
@@ -918,6 +916,9 @@ var TunaApiClient = class {
918
916
  if (options.orderType?.length) {
919
917
  query.order_type = options.orderType.join(",");
920
918
  }
919
+ if (options.uiDiretion?.length) {
920
+ query.ui_direction = options.uiDiretion.join(",");
921
+ }
921
922
  if (options.limit) {
922
923
  query.limit = options.limit;
923
924
  }
package/dist/index.mjs CHANGED
@@ -496,8 +496,6 @@ var OrderHistoryEntry = z.object({
496
496
  authority: z.string(),
497
497
  orderType: OrderHistoryOrderTypeSchema,
498
498
  isReduceOnly: z.nullable(z.boolean()),
499
- uiTakeProfitPrice: z.nullable(z.number()),
500
- uiStopLossPrice: z.nullable(z.number()),
501
499
  aToB: z.boolean(),
502
500
  uiDirection: OrderHistoryUIDirectionSchema,
503
501
  uiPrice: z.nullable(z.number()),
@@ -883,6 +881,9 @@ var TunaApiClient = class {
883
881
  if (options.orderType?.length) {
884
882
  query.order_type = options.orderType.join(",");
885
883
  }
884
+ if (options.uiDiretion?.length) {
885
+ query.ui_direction = options.uiDiretion.join(",");
886
+ }
886
887
  if (options.limit) {
887
888
  query.limit = options.limit;
888
889
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",