@symmio/trading-core 4.0.0 → 4.2.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.
Files changed (447) hide show
  1. package/dist/balance-history/get-balance-history/types.d.ts +3 -1
  2. package/dist/balance-history/get-balance-history/types.d.ts.map +1 -1
  3. package/dist/balance-history/get-balance-history/types.js +1 -1
  4. package/dist/balance-history/get-balance-history/types.js.map +1 -1
  5. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.d.ts +50 -0
  6. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.d.ts.map +1 -0
  7. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.js +30 -0
  8. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.js.map +1 -0
  9. package/dist/funding/get-funding-index-checkpoints/index.d.ts +5 -0
  10. package/dist/funding/get-funding-index-checkpoints/index.d.ts.map +1 -0
  11. package/dist/funding/get-funding-index-checkpoints/query-document.d.ts +16 -0
  12. package/dist/funding/get-funding-index-checkpoints/query-document.d.ts.map +1 -0
  13. package/dist/funding/get-funding-index-checkpoints/query-document.js +7 -0
  14. package/dist/funding/get-funding-index-checkpoints/query-document.js.map +1 -0
  15. package/dist/funding/get-funding-index-checkpoints/query.d.ts +37 -0
  16. package/dist/funding/get-funding-index-checkpoints/query.d.ts.map +1 -0
  17. package/dist/funding/get-funding-index-checkpoints/query.js +23 -0
  18. package/dist/funding/get-funding-index-checkpoints/query.js.map +1 -0
  19. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.d.ts +12 -0
  20. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.d.ts.map +1 -0
  21. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.js +31 -0
  22. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.js.map +1 -0
  23. package/dist/funding/get-funding-index-checkpoints/types.d.ts +51 -0
  24. package/dist/funding/get-funding-index-checkpoints/types.d.ts.map +1 -0
  25. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.d.ts +47 -0
  26. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.d.ts.map +1 -0
  27. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.js +30 -0
  28. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.js.map +1 -0
  29. package/dist/funding/get-quote-funding-settlements/index.d.ts +5 -0
  30. package/dist/funding/get-quote-funding-settlements/index.d.ts.map +1 -0
  31. package/dist/funding/get-quote-funding-settlements/query-document.d.ts +16 -0
  32. package/dist/funding/get-quote-funding-settlements/query-document.d.ts.map +1 -0
  33. package/dist/funding/get-quote-funding-settlements/query-document.js +7 -0
  34. package/dist/funding/get-quote-funding-settlements/query-document.js.map +1 -0
  35. package/dist/funding/get-quote-funding-settlements/query.d.ts +37 -0
  36. package/dist/funding/get-quote-funding-settlements/query.d.ts.map +1 -0
  37. package/dist/funding/get-quote-funding-settlements/query.js +23 -0
  38. package/dist/funding/get-quote-funding-settlements/query.js.map +1 -0
  39. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.d.ts +12 -0
  40. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.d.ts.map +1 -0
  41. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.js +33 -0
  42. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.js.map +1 -0
  43. package/dist/funding/get-quote-funding-settlements/types.d.ts +56 -0
  44. package/dist/funding/get-quote-funding-settlements/types.d.ts.map +1 -0
  45. package/dist/funding/index.d.ts +3 -0
  46. package/dist/funding/index.d.ts.map +1 -0
  47. package/dist/index.d.ts +63 -4
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +427 -386
  50. package/dist/liquidation/get-liquidation-details/get-liquidation-details.d.ts +44 -0
  51. package/dist/liquidation/get-liquidation-details/get-liquidation-details.d.ts.map +1 -0
  52. package/dist/liquidation/get-liquidation-details/get-liquidation-details.js +30 -0
  53. package/dist/liquidation/get-liquidation-details/get-liquidation-details.js.map +1 -0
  54. package/dist/liquidation/get-liquidation-details/index.d.ts +5 -0
  55. package/dist/liquidation/get-liquidation-details/index.d.ts.map +1 -0
  56. package/dist/liquidation/get-liquidation-details/query-document.d.ts +16 -0
  57. package/dist/liquidation/get-liquidation-details/query-document.d.ts.map +1 -0
  58. package/dist/liquidation/get-liquidation-details/query-document.js +7 -0
  59. package/dist/liquidation/get-liquidation-details/query-document.js.map +1 -0
  60. package/dist/liquidation/get-liquidation-details/query.d.ts +37 -0
  61. package/dist/liquidation/get-liquidation-details/query.d.ts.map +1 -0
  62. package/dist/liquidation/get-liquidation-details/query.js +23 -0
  63. package/dist/liquidation/get-liquidation-details/query.js.map +1 -0
  64. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.d.ts +12 -0
  65. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.d.ts.map +1 -0
  66. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.js +32 -0
  67. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.js.map +1 -0
  68. package/dist/liquidation/get-liquidation-details/types.d.ts +47 -0
  69. package/dist/liquidation/get-liquidation-details/types.d.ts.map +1 -0
  70. package/dist/liquidation/index.d.ts +2 -0
  71. package/dist/liquidation/index.d.ts.map +1 -0
  72. package/dist/margin/get-margin-transfers/get-margin-transfers.d.ts +51 -0
  73. package/dist/margin/get-margin-transfers/get-margin-transfers.d.ts.map +1 -0
  74. package/dist/margin/get-margin-transfers/get-margin-transfers.js +32 -0
  75. package/dist/margin/get-margin-transfers/get-margin-transfers.js.map +1 -0
  76. package/dist/margin/get-margin-transfers/index.d.ts +5 -0
  77. package/dist/margin/get-margin-transfers/index.d.ts.map +1 -0
  78. package/dist/margin/get-margin-transfers/query-document.d.ts +17 -0
  79. package/dist/margin/get-margin-transfers/query-document.d.ts.map +1 -0
  80. package/dist/margin/get-margin-transfers/query-document.js +7 -0
  81. package/dist/margin/get-margin-transfers/query-document.js.map +1 -0
  82. package/dist/margin/get-margin-transfers/query.d.ts +37 -0
  83. package/dist/margin/get-margin-transfers/query.d.ts.map +1 -0
  84. package/dist/margin/get-margin-transfers/query.js +23 -0
  85. package/dist/margin/get-margin-transfers/query.js.map +1 -0
  86. package/dist/margin/get-margin-transfers/to-margin-transfer-row.d.ts +12 -0
  87. package/dist/margin/get-margin-transfers/to-margin-transfer-row.d.ts.map +1 -0
  88. package/dist/margin/get-margin-transfers/to-margin-transfer-row.js +19 -0
  89. package/dist/margin/get-margin-transfers/to-margin-transfer-row.js.map +1 -0
  90. package/dist/margin/get-margin-transfers/types.d.ts +27 -0
  91. package/dist/margin/get-margin-transfers/types.d.ts.map +1 -0
  92. package/dist/margin/index.d.ts +1 -0
  93. package/dist/margin/index.d.ts.map +1 -1
  94. package/dist/pools/add-market/to-created-pool.d.ts.map +1 -1
  95. package/dist/pools/add-market/to-created-pool.js +4 -0
  96. package/dist/pools/add-market/to-created-pool.js.map +1 -1
  97. package/dist/pools/add-market/types.d.ts +8 -0
  98. package/dist/pools/add-market/types.d.ts.map +1 -1
  99. package/dist/pools/auth/authenticate-listing.d.ts +3 -1
  100. package/dist/pools/auth/authenticate-listing.d.ts.map +1 -1
  101. package/dist/pools/auth/authenticate-listing.js +28 -23
  102. package/dist/pools/auth/authenticate-listing.js.map +1 -1
  103. package/dist/pools/auth/can-reuse-listing-challenge.d.ts +5 -0
  104. package/dist/pools/auth/can-reuse-listing-challenge.d.ts.map +1 -0
  105. package/dist/pools/auth/can-reuse-listing-challenge.js +9 -0
  106. package/dist/pools/auth/can-reuse-listing-challenge.js.map +1 -0
  107. package/dist/pools/auth/query.d.ts +15 -0
  108. package/dist/pools/auth/query.d.ts.map +1 -1
  109. package/dist/pools/auth/query.js +28 -4
  110. package/dist/pools/auth/query.js.map +1 -1
  111. package/dist/pools/auth/to-siwe.d.ts +5 -1
  112. package/dist/pools/auth/to-siwe.d.ts.map +1 -1
  113. package/dist/pools/auth/to-siwe.js +4 -2
  114. package/dist/pools/auth/to-siwe.js.map +1 -1
  115. package/dist/pools/auth/types.d.ts +2 -0
  116. package/dist/pools/auth/types.d.ts.map +1 -1
  117. package/dist/pools/cancel-withdraw/cancel-withdraw.js +1 -1
  118. package/dist/pools/cancel-withdraw/cancel-withdraw.js.map +1 -1
  119. package/dist/pools/claim-history/get-pool-claim.d.ts +11 -0
  120. package/dist/pools/claim-history/get-pool-claim.d.ts.map +1 -0
  121. package/dist/pools/claim-history/get-pool-claim.js +25 -0
  122. package/dist/pools/claim-history/get-pool-claim.js.map +1 -0
  123. package/dist/pools/claim-history/index.d.ts +1 -0
  124. package/dist/pools/claim-history/index.d.ts.map +1 -1
  125. package/dist/pools/claim-history/to-pool-claim.d.ts.map +1 -1
  126. package/dist/pools/claim-history/to-pool-claim.js +2 -0
  127. package/dist/pools/claim-history/to-pool-claim.js.map +1 -1
  128. package/dist/pools/composition.d.ts +16 -0
  129. package/dist/pools/composition.d.ts.map +1 -0
  130. package/dist/pools/composition.js +39 -0
  131. package/dist/pools/composition.js.map +1 -0
  132. package/dist/pools/empty-pool-profit.d.ts +4 -0
  133. package/dist/pools/empty-pool-profit.d.ts.map +1 -0
  134. package/dist/pools/empty-pool-profit.js +17 -0
  135. package/dist/pools/empty-pool-profit.js.map +1 -0
  136. package/dist/pools/index.d.ts +8 -0
  137. package/dist/pools/index.d.ts.map +1 -1
  138. package/dist/pools/listing-config/to-listing-config.d.ts +5 -1
  139. package/dist/pools/listing-config/to-listing-config.d.ts.map +1 -1
  140. package/dist/pools/listing-config/to-listing-config.js +19 -8
  141. package/dist/pools/listing-config/to-listing-config.js.map +1 -1
  142. package/dist/pools/maintenance-fees/get-pool-maintenance-fees.d.ts +37 -0
  143. package/dist/pools/maintenance-fees/get-pool-maintenance-fees.d.ts.map +1 -0
  144. package/dist/pools/maintenance-fees/get-pool-maintenance-fees.js +35 -0
  145. package/dist/pools/maintenance-fees/get-pool-maintenance-fees.js.map +1 -0
  146. package/dist/pools/maintenance-fees/index.d.ts +3 -0
  147. package/dist/pools/maintenance-fees/index.d.ts.map +1 -0
  148. package/dist/pools/maintenance-fees/query.d.ts +11 -0
  149. package/dist/pools/maintenance-fees/query.d.ts.map +1 -0
  150. package/dist/pools/maintenance-fees/query.js +21 -0
  151. package/dist/pools/maintenance-fees/query.js.map +1 -0
  152. package/dist/pools/market-config/to-listing-market-config.d.ts +6 -1
  153. package/dist/pools/market-config/to-listing-market-config.d.ts.map +1 -1
  154. package/dist/pools/market-config/to-listing-market-config.js +1 -0
  155. package/dist/pools/market-config/to-listing-market-config.js.map +1 -1
  156. package/dist/pools/market-config/types.d.ts +5 -0
  157. package/dist/pools/market-config/types.d.ts.map +1 -1
  158. package/dist/pools/market-config/types.js.map +1 -1
  159. package/dist/pools/market-data/get-pool-market-data.d.ts +14 -0
  160. package/dist/pools/market-data/get-pool-market-data.d.ts.map +1 -0
  161. package/dist/pools/market-data/get-pool-market-data.js +25 -0
  162. package/dist/pools/market-data/get-pool-market-data.js.map +1 -0
  163. package/dist/pools/market-data/index.d.ts +2 -0
  164. package/dist/pools/market-data/index.d.ts.map +1 -0
  165. package/dist/pools/market-detail/to-listing-market-detail.d.ts +5 -1
  166. package/dist/pools/market-detail/to-listing-market-detail.d.ts.map +1 -1
  167. package/dist/pools/market-detail/to-listing-market-detail.js +45 -33
  168. package/dist/pools/market-detail/to-listing-market-detail.js.map +1 -1
  169. package/dist/pools/markets/to-listing-market.d.ts +13 -1
  170. package/dist/pools/markets/to-listing-market.d.ts.map +1 -1
  171. package/dist/pools/markets/to-listing-market.js +24 -12
  172. package/dist/pools/markets/to-listing-market.js.map +1 -1
  173. package/dist/pools/open-positions/calculate-pool-open-positions.d.ts +39 -0
  174. package/dist/pools/open-positions/calculate-pool-open-positions.d.ts.map +1 -0
  175. package/dist/pools/open-positions/calculate-pool-open-positions.js +83 -0
  176. package/dist/pools/open-positions/calculate-pool-open-positions.js.map +1 -0
  177. package/dist/pools/open-positions/get-pool-open-positions.d.ts +17 -0
  178. package/dist/pools/open-positions/get-pool-open-positions.d.ts.map +1 -0
  179. package/dist/pools/open-positions/get-pool-open-positions.js +39 -0
  180. package/dist/pools/open-positions/get-pool-open-positions.js.map +1 -0
  181. package/dist/pools/open-positions/index.d.ts +4 -0
  182. package/dist/pools/open-positions/index.d.ts.map +1 -0
  183. package/dist/pools/open-positions/query.d.ts +17 -0
  184. package/dist/pools/open-positions/query.d.ts.map +1 -0
  185. package/dist/pools/open-positions/query.js +21 -0
  186. package/dist/pools/open-positions/query.js.map +1 -0
  187. package/dist/pools/portfolio/calculate-pool-portfolio.d.ts +66 -0
  188. package/dist/pools/portfolio/calculate-pool-portfolio.d.ts.map +1 -0
  189. package/dist/pools/portfolio/calculate-pool-portfolio.js +96 -0
  190. package/dist/pools/portfolio/calculate-pool-portfolio.js.map +1 -0
  191. package/dist/pools/portfolio/get-pool-portfolio.d.ts +19 -0
  192. package/dist/pools/portfolio/get-pool-portfolio.d.ts.map +1 -0
  193. package/dist/pools/portfolio/get-pool-portfolio.js +88 -0
  194. package/dist/pools/portfolio/get-pool-portfolio.js.map +1 -0
  195. package/dist/pools/portfolio/index.d.ts +4 -0
  196. package/dist/pools/portfolio/index.d.ts.map +1 -0
  197. package/dist/pools/portfolio/query.d.ts +17 -0
  198. package/dist/pools/portfolio/query.d.ts.map +1 -0
  199. package/dist/pools/portfolio/query.js +21 -0
  200. package/dist/pools/portfolio/query.js.map +1 -0
  201. package/dist/pools/portfolio/read-positions.d.ts +4 -0
  202. package/dist/pools/portfolio/read-positions.d.ts.map +1 -0
  203. package/dist/pools/portfolio/read-positions.js +31 -0
  204. package/dist/pools/portfolio/read-positions.js.map +1 -0
  205. package/dist/pools/position/calculate-pool-position.d.ts +85 -0
  206. package/dist/pools/position/calculate-pool-position.d.ts.map +1 -0
  207. package/dist/pools/position/calculate-pool-position.js +59 -0
  208. package/dist/pools/position/calculate-pool-position.js.map +1 -0
  209. package/dist/pools/position/get-pool-position.d.ts +22 -0
  210. package/dist/pools/position/get-pool-position.d.ts.map +1 -0
  211. package/dist/pools/position/get-pool-position.js +47 -0
  212. package/dist/pools/position/get-pool-position.js.map +1 -0
  213. package/dist/pools/position/index.d.ts +4 -0
  214. package/dist/pools/position/index.d.ts.map +1 -0
  215. package/dist/pools/position/query.d.ts +17 -0
  216. package/dist/pools/position/query.d.ts.map +1 -0
  217. package/dist/pools/position/query.js +21 -0
  218. package/dist/pools/position/query.js.map +1 -0
  219. package/dist/pools/position/sum-deposits.d.ts +10 -0
  220. package/dist/pools/position/sum-deposits.d.ts.map +1 -0
  221. package/dist/pools/position/sum-deposits.js +35 -0
  222. package/dist/pools/position/sum-deposits.js.map +1 -0
  223. package/dist/pools/profit/get-user-profit.d.ts +4 -0
  224. package/dist/pools/profit/get-user-profit.d.ts.map +1 -1
  225. package/dist/pools/profit/get-user-profit.js +18 -12
  226. package/dist/pools/profit/get-user-profit.js.map +1 -1
  227. package/dist/pools/profit/to-user-pool-profit.d.ts +22 -4
  228. package/dist/pools/profit/to-user-pool-profit.d.ts.map +1 -1
  229. package/dist/pools/profit/to-user-pool-profit.js +28 -12
  230. package/dist/pools/profit/to-user-pool-profit.js.map +1 -1
  231. package/dist/pools/quotes/get-pool-quotes.d.ts +8 -1
  232. package/dist/pools/quotes/get-pool-quotes.d.ts.map +1 -1
  233. package/dist/pools/quotes/get-pool-quotes.js +8 -1
  234. package/dist/pools/quotes/get-pool-quotes.js.map +1 -1
  235. package/dist/pools/quotes/query-document.d.ts.map +1 -1
  236. package/dist/pools/quotes/query-document.js +1 -1
  237. package/dist/pools/quotes/query-document.js.map +1 -1
  238. package/dist/pools/quotes/to-pool-quote.d.ts.map +1 -1
  239. package/dist/pools/quotes/to-pool-quote.js +13 -0
  240. package/dist/pools/quotes/to-pool-quote.js.map +1 -1
  241. package/dist/pools/rewards/query.js +25 -25
  242. package/dist/pools/statistics/calculate-pool-statistics.d.ts +69 -0
  243. package/dist/pools/statistics/calculate-pool-statistics.d.ts.map +1 -0
  244. package/dist/pools/statistics/calculate-pool-statistics.js +42 -0
  245. package/dist/pools/statistics/calculate-pool-statistics.js.map +1 -0
  246. package/dist/pools/statistics/get-pool-statistics.d.ts +29 -0
  247. package/dist/pools/statistics/get-pool-statistics.d.ts.map +1 -0
  248. package/dist/pools/statistics/get-pool-statistics.js +61 -0
  249. package/dist/pools/statistics/get-pool-statistics.js.map +1 -0
  250. package/dist/pools/statistics/index.d.ts +4 -0
  251. package/dist/pools/statistics/index.d.ts.map +1 -0
  252. package/dist/pools/statistics/query.d.ts +17 -0
  253. package/dist/pools/statistics/query.d.ts.map +1 -0
  254. package/dist/pools/statistics/query.js +21 -0
  255. package/dist/pools/statistics/query.js.map +1 -0
  256. package/dist/pools/token-metadata/get-listing-token-metadata.d.ts +32 -0
  257. package/dist/pools/token-metadata/get-listing-token-metadata.d.ts.map +1 -0
  258. package/dist/pools/token-metadata/get-listing-token-metadata.js +43 -0
  259. package/dist/pools/token-metadata/get-listing-token-metadata.js.map +1 -0
  260. package/dist/pools/token-metadata/index.d.ts +3 -0
  261. package/dist/pools/token-metadata/index.d.ts.map +1 -0
  262. package/dist/pools/token-metadata/query.d.ts +11 -0
  263. package/dist/pools/token-metadata/query.d.ts.map +1 -0
  264. package/dist/pools/token-metadata/query.js +21 -0
  265. package/dist/pools/token-metadata/query.js.map +1 -0
  266. package/dist/pools/token-support/check-listing-token-support.d.ts +23 -0
  267. package/dist/pools/token-support/check-listing-token-support.d.ts.map +1 -0
  268. package/dist/pools/token-support/check-listing-token-support.js +36 -0
  269. package/dist/pools/token-support/check-listing-token-support.js.map +1 -0
  270. package/dist/pools/token-support/index.d.ts +3 -0
  271. package/dist/pools/token-support/index.d.ts.map +1 -0
  272. package/dist/pools/token-support/query.d.ts +11 -0
  273. package/dist/pools/token-support/query.d.ts.map +1 -0
  274. package/dist/pools/token-support/query.js +21 -0
  275. package/dist/pools/token-support/query.js.map +1 -0
  276. package/dist/pools/trade-history/calculate-history-metrics.d.ts +12 -0
  277. package/dist/pools/trade-history/calculate-history-metrics.d.ts.map +1 -0
  278. package/dist/pools/trade-history/calculate-history-metrics.js +36 -0
  279. package/dist/pools/trade-history/calculate-history-metrics.js.map +1 -0
  280. package/dist/pools/trade-history/get-pool-trade-history.d.ts +21 -1
  281. package/dist/pools/trade-history/get-pool-trade-history.d.ts.map +1 -1
  282. package/dist/pools/trade-history/get-pool-trade-history.js +57 -18
  283. package/dist/pools/trade-history/get-pool-trade-history.js.map +1 -1
  284. package/dist/pools/trade-history/query-document.d.ts +3 -0
  285. package/dist/pools/trade-history/query-document.d.ts.map +1 -1
  286. package/dist/pools/trade-history/query-document.js +1 -1
  287. package/dist/pools/trade-history/query-document.js.map +1 -1
  288. package/dist/pools/transactions/get-pool-transaction-range.d.ts +6 -0
  289. package/dist/pools/transactions/get-pool-transaction-range.d.ts.map +1 -0
  290. package/dist/pools/transactions/get-pool-transaction-range.js +26 -0
  291. package/dist/pools/transactions/get-pool-transaction-range.js.map +1 -0
  292. package/dist/pools/transactions/index.d.ts +1 -0
  293. package/dist/pools/transactions/index.d.ts.map +1 -1
  294. package/dist/pools/types/generated/listing-backend.js +34 -10
  295. package/dist/pools/types/generated/listing-backend.js.map +1 -1
  296. package/dist/pools/types.d.ts +129 -6
  297. package/dist/pools/types.d.ts.map +1 -1
  298. package/dist/pools/types.js.map +1 -1
  299. package/dist/pools/user-markets/get-user-listing-markets.d.ts +2 -0
  300. package/dist/pools/user-markets/get-user-listing-markets.d.ts.map +1 -1
  301. package/dist/pools/user-markets/get-user-listing-markets.js.map +1 -1
  302. package/dist/pools/user-markets/to-user-listing-market.js +1 -1
  303. package/dist/pools/user-markets/to-user-listing-market.js.map +1 -1
  304. package/dist/pools/user-transactions/get-user-transactions.d.ts +2 -0
  305. package/dist/pools/user-transactions/get-user-transactions.d.ts.map +1 -1
  306. package/dist/pools/user-transactions/get-user-transactions.js.map +1 -1
  307. package/dist/pools/user-transactions/to-user-transaction.d.ts +5 -1
  308. package/dist/pools/user-transactions/to-user-transaction.d.ts.map +1 -1
  309. package/dist/pools/user-transactions/to-user-transaction.js +3 -0
  310. package/dist/pools/user-transactions/to-user-transaction.js.map +1 -1
  311. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.d.ts +22 -12
  312. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.d.ts.map +1 -1
  313. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.js +20 -21
  314. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.js.map +1 -1
  315. package/dist/quotes/get-quote-events-by-type/query-document.d.ts +5 -5
  316. package/dist/quotes/get-quote-events-by-type/query-document.d.ts.map +1 -1
  317. package/dist/quotes/get-quote-events-by-type/query-document.js +1 -1
  318. package/dist/quotes/get-quote-events-by-type/query-document.js.map +1 -1
  319. package/dist/quotes/get-quote-events-by-type/query.d.ts +7 -6
  320. package/dist/quotes/get-quote-events-by-type/query.d.ts.map +1 -1
  321. package/dist/quotes/get-quote-events-by-type/query.js +19 -17
  322. package/dist/quotes/get-quote-events-by-type/query.js.map +1 -1
  323. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.d.ts +2 -2
  324. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.d.ts.map +1 -1
  325. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.js +1 -3
  326. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.js.map +1 -1
  327. package/dist/quotes/get-quote-events-by-type/types.d.ts +14 -3
  328. package/dist/quotes/get-quote-events-by-type/types.d.ts.map +1 -1
  329. package/dist/quotes/get-quote-events-by-type/types.js.map +1 -1
  330. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts +12 -2
  331. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts.map +1 -1
  332. package/dist/quotes/get-quote-funding/get-quote-funding.js +21 -17
  333. package/dist/quotes/get-quote-funding/get-quote-funding.js.map +1 -1
  334. package/dist/quotes/get-quote-funding/query-document.d.ts +3 -2
  335. package/dist/quotes/get-quote-funding/query-document.d.ts.map +1 -1
  336. package/dist/quotes/get-quote-funding/query-document.js +1 -1
  337. package/dist/quotes/get-quote-funding/query-document.js.map +1 -1
  338. package/dist/quotes/get-quote-funding/query.d.ts.map +1 -1
  339. package/dist/quotes/get-quote-funding/query.js +2 -1
  340. package/dist/quotes/get-quote-funding/query.js.map +1 -1
  341. package/dist/quotes/get-quote-funding/to-funding-row.d.ts.map +1 -1
  342. package/dist/quotes/get-quote-funding/to-funding-row.js +1 -3
  343. package/dist/quotes/get-quote-funding/to-funding-row.js.map +1 -1
  344. package/dist/quotes/get-quote-history/get-quote-history.d.ts +18 -7
  345. package/dist/quotes/get-quote-history/get-quote-history.d.ts.map +1 -1
  346. package/dist/quotes/get-quote-history/get-quote-history.js +32 -22
  347. package/dist/quotes/get-quote-history/get-quote-history.js.map +1 -1
  348. package/dist/quotes/get-quote-history/query-document.d.ts +12 -7
  349. package/dist/quotes/get-quote-history/query-document.d.ts.map +1 -1
  350. package/dist/quotes/get-quote-history/query-document.js +1 -1
  351. package/dist/quotes/get-quote-history/query-document.js.map +1 -1
  352. package/dist/quotes/get-quote-history/query.d.ts +3 -2
  353. package/dist/quotes/get-quote-history/query.d.ts.map +1 -1
  354. package/dist/quotes/get-quote-history/query.js +22 -19
  355. package/dist/quotes/get-quote-history/query.js.map +1 -1
  356. package/dist/quotes/get-quote-history/to-history-row.d.ts.map +1 -1
  357. package/dist/quotes/get-quote-history/to-history-row.js +52 -37
  358. package/dist/quotes/get-quote-history/to-history-row.js.map +1 -1
  359. package/dist/quotes/get-quote-history/types.d.ts +41 -0
  360. package/dist/quotes/get-quote-history/types.d.ts.map +1 -1
  361. package/dist/quotes/get-quote-history/types.js.map +1 -1
  362. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts +21 -11
  363. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts.map +1 -1
  364. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js +19 -21
  365. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js.map +1 -1
  366. package/dist/quotes/get-quotes-events-by-type/query-document.d.ts +7 -7
  367. package/dist/quotes/get-quotes-events-by-type/query-document.d.ts.map +1 -1
  368. package/dist/quotes/get-quotes-events-by-type/query-document.js +1 -1
  369. package/dist/quotes/get-quotes-events-by-type/query-document.js.map +1 -1
  370. package/dist/quotes/get-quotes-events-by-type/query.d.ts +8 -6
  371. package/dist/quotes/get-quotes-events-by-type/query.d.ts.map +1 -1
  372. package/dist/quotes/get-quotes-events-by-type/query.js +22 -20
  373. package/dist/quotes/get-quotes-events-by-type/query.js.map +1 -1
  374. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.d.ts +38 -0
  375. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.d.ts.map +1 -0
  376. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.js +28 -0
  377. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.js.map +1 -0
  378. package/dist/quotes/get-subgraph-quotes/index.d.ts +5 -0
  379. package/dist/quotes/get-subgraph-quotes/index.d.ts.map +1 -0
  380. package/dist/quotes/get-subgraph-quotes/query-document.d.ts +15 -0
  381. package/dist/quotes/get-subgraph-quotes/query-document.d.ts.map +1 -0
  382. package/dist/quotes/get-subgraph-quotes/query-document.js +7 -0
  383. package/dist/quotes/get-subgraph-quotes/query-document.js.map +1 -0
  384. package/dist/quotes/get-subgraph-quotes/query.d.ts +37 -0
  385. package/dist/quotes/get-subgraph-quotes/query.d.ts.map +1 -0
  386. package/dist/quotes/get-subgraph-quotes/query.js +23 -0
  387. package/dist/quotes/get-subgraph-quotes/query.js.map +1 -0
  388. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.d.ts +12 -0
  389. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.d.ts.map +1 -0
  390. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.js +32 -0
  391. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.js.map +1 -0
  392. package/dist/quotes/get-subgraph-quotes/types.d.ts +54 -0
  393. package/dist/quotes/get-subgraph-quotes/types.d.ts.map +1 -0
  394. package/dist/quotes/index.d.ts +1 -0
  395. package/dist/quotes/index.d.ts.map +1 -1
  396. package/dist/quotes/liquidation/calculate-liquidation-price.d.ts +5 -1
  397. package/dist/quotes/liquidation/calculate-liquidation-price.d.ts.map +1 -1
  398. package/dist/quotes/liquidation/calculate-liquidation-price.js +1 -1
  399. package/dist/quotes/liquidation/calculate-liquidation-price.js.map +1 -1
  400. package/dist/quotes/upnl/calculate-quote-pnl.d.ts.map +1 -1
  401. package/dist/quotes/upnl/calculate-quote-pnl.js +8 -8
  402. package/dist/quotes/upnl/calculate-quote-pnl.js.map +1 -1
  403. package/dist/quotes/upnl/calculate-quote-upnl.d.ts +2 -2
  404. package/dist/quotes/upnl/calculate-quote-upnl.d.ts.map +1 -1
  405. package/dist/quotes/upnl/calculate-quote-upnl.js +16 -15
  406. package/dist/quotes/upnl/calculate-quote-upnl.js.map +1 -1
  407. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.d.ts +122 -0
  408. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.d.ts.map +1 -0
  409. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.js +80 -0
  410. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.js.map +1 -0
  411. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/index.d.ts +3 -0
  412. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/index.d.ts.map +1 -0
  413. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.d.ts +37 -0
  414. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.d.ts.map +1 -0
  415. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.js +27 -0
  416. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.js.map +1 -0
  417. package/dist/symmio-contracts/symmio/index.d.ts +2 -0
  418. package/dist/symmio-contracts/symmio/index.d.ts.map +1 -1
  419. package/dist/symmio-contracts/symmio/is-party-a-liquidated/index.d.ts +3 -0
  420. package/dist/symmio-contracts/symmio/is-party-a-liquidated/index.d.ts.map +1 -0
  421. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.d.ts +37 -0
  422. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.d.ts.map +1 -0
  423. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.js +15 -0
  424. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.js.map +1 -0
  425. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.d.ts +38 -0
  426. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.d.ts.map +1 -0
  427. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.js +29 -0
  428. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.js.map +1 -0
  429. package/dist/symmio-subgraph/index.d.ts +1 -0
  430. package/dist/symmio-subgraph/index.d.ts.map +1 -1
  431. package/dist/symmio-subgraph/subgraph-decode.d.ts +51 -0
  432. package/dist/symmio-subgraph/subgraph-decode.d.ts.map +1 -0
  433. package/dist/symmio-subgraph/subgraph-decode.js +24 -0
  434. package/dist/symmio-subgraph/subgraph-decode.js.map +1 -0
  435. package/dist/symmio-subgraph/subgraph-filters.d.ts +97 -0
  436. package/dist/symmio-subgraph/subgraph-filters.d.ts.map +1 -0
  437. package/dist/symmio-subgraph/subgraph-filters.js +39 -0
  438. package/dist/symmio-subgraph/subgraph-filters.js.map +1 -0
  439. package/dist/symmio-subgraph/types/generated/analytics/gql.d.ts +26 -6
  440. package/dist/symmio-subgraph/types/generated/analytics/gql.d.ts.map +1 -1
  441. package/dist/symmio-subgraph/types/generated/analytics/gql.js +16 -11
  442. package/dist/symmio-subgraph/types/generated/analytics/gql.js.map +1 -1
  443. package/dist/symmio-subgraph/types/generated/analytics/graphql.d.ts +3661 -9
  444. package/dist/symmio-subgraph/types/generated/analytics/graphql.d.ts.map +1 -1
  445. package/dist/symmio-subgraph/types/generated/analytics/graphql.js +2 -2
  446. package/dist/symmio-subgraph/types/generated/analytics/graphql.js.map +1 -1
  447. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-listing-token-support.js","names":[],"sources":["../../../src/pools/token-support/check-listing-token-support.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { ChainIdParameter } from \"../../shared/types/properties\";\nimport { resolveListingService } from \"../resolve-listing\";\nimport { checkTokenSupportV2MarketTokenSupportGet } from \"../types/generated/listing-backend\";\n\n/** Inputs for {@link checkListingTokenSupport}. Deployment chainId is separate from depositChain. */\nexport type CheckListingTokenSupportParameters = ChainIdParameter & {\n /** Token address on the deposit chain. */\n tokenContractAddress: string;\n /** Token's chain, including Solana's zero sentinel. */\n depositChain: number;\n /** Listing bearer token. */\n accessToken: string;\n};\n/** Result of {@link checkListingTokenSupport}. */\nexport type CheckListingTokenSupportReturnType = boolean;\n\n/**\n * Check whether the listing service accepts a token, including errors returned with HTTP 200.\n * @param config - SDK configuration.\n * @param parameters - Token identity and request parameters.\n * @returns The normalized service result.\n * @example\n * await checkListingTokenSupport(config, { chainId: 42161, depositChain: 0, tokenContractAddress: mint, accessToken: token });\n */\nexport async function checkListingTokenSupport(\n config: Config,\n parameters: CheckListingTokenSupportParameters,\n): Promise<CheckListingTokenSupportReturnType> {\n const { url: baseURL } = resolveListingService(config, { chainId: parameters.chainId });\n try {\n const { data } = await checkTokenSupportV2MarketTokenSupportGet(\n { contract_address: parameters.tokenContractAddress, chain: parameters.depositChain },\n { baseURL, headers: { Authorization: `Bearer ${parameters.accessToken}` } },\n );\n if (typeof data === \"object\" && data !== null && \"error_code\" in data && typeof data.error_code === \"number\") {\n throw new SymmApiError({\n code: \"LISTING_TOKEN_SUPPORT_FAILED\",\n message:\n \"error_message\" in data && typeof data.error_message === \"string\"\n ? data.error_message\n : \"Token support check failed\",\n status: 200,\n statusText: \"OK\",\n responseData: data,\n url: baseURL + \"/v2/market/token-support\",\n method: \"GET\",\n });\n }\n return true;\n } catch (error) {\n if (error instanceof SymmError) throw error;\n if (isAxiosError(error))\n throw SymmApiError.fromAxios(error, { code: \"CHECK_LISTING_TOKEN_SUPPORT_FAILED\", baseURL });\n throw new SymmError(\"api\", \"CHECK_LISTING_TOKEN_SUPPORT_FAILED\", \"Listing request failed\", { cause: error });\n }\n}\n"],"mappings":";;;;;AA2BA,eAAsB,EACpB,GACA,GAC6C;CAC7C,IAAM,EAAE,KAAK,MAAY,EAAsB,GAAQ,EAAE,SAAS,EAAW,QAAQ,CAAC;CACtF,IAAI;EACF,IAAM,EAAE,YAAS,MAAM,EACrB;GAAE,kBAAkB,EAAW;GAAsB,OAAO,EAAW;EAAa,GACpF;GAAE;GAAS,SAAS,EAAE,eAAe,UAAU,EAAW,cAAc;EAAE,CAC5E;EACA,IAAI,OAAO,KAAS,YAAY,KAAiB,gBAAgB,KAAQ,OAAO,EAAK,cAAe,UAClG,MAAM,IAAI,EAAa;GACrB,MAAM;GACN,SACE,mBAAmB,KAAQ,OAAO,EAAK,iBAAkB,WACrD,EAAK,gBACL;GACN,QAAQ;GACR,YAAY;GACZ,cAAc;GACd,KAAK,IAAU;GACf,QAAQ;EACV,CAAC;EAEH,OAAO;CACT,SAAS,GAAO;EAId,MAHI,aAAiB,IAAiB,IAClC,EAAa,CAAK,IACd,EAAa,UAAU,GAAO;GAAE,MAAM;GAAsC;EAAQ,CAAC,IACvF,IAAI,EAAU,OAAO,sCAAsC,0BAA0B,EAAE,OAAO,EAAM,CAAC;CAC7G;AACF"}
@@ -0,0 +1,3 @@
1
+ export * from './check-listing-token-support.js';
2
+ export * from './query.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pools/token-support/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { ConfigKeyParameter } from '../../shared/types/properties.js';
3
+ import { QueryParameter, SymmioQueryOptions } from '../../shared/types/query.js';
4
+ import { CheckListingTokenSupportParameters, CheckListingTokenSupportReturnType } from './check-listing-token-support.js';
5
+ /** Query options for {@link checkListingTokenSupport}. */
6
+ export type CheckListingTokenSupportOptions = CheckListingTokenSupportParameters & QueryParameter<CheckListingTokenSupportReturnType>;
7
+ /** Stable cache identity, including deployment configuration. */
8
+ export declare function checkListingTokenSupportQueryKey(options: CheckListingTokenSupportParameters & ConfigKeyParameter): readonly ["checkListingTokenSupport", Record<string, unknown>];
9
+ /** Build options for the listing read. Required identity/auth inputs gate execution. */
10
+ export declare function checkListingTokenSupportQueryOptions(config: Config, options: CheckListingTokenSupportOptions): SymmioQueryOptions<CheckListingTokenSupportReturnType>;
11
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/pools/token-support/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAEL,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACxC,MAAM,+BAA+B,CAAC;AAEvC,0DAA0D;AAC1D,MAAM,MAAM,+BAA+B,GAAG,kCAAkC,GAC9E,cAAc,CAAC,kCAAkC,CAAC,CAAC;AACrD,iEAAiE;AACjE,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,kCAAkC,GAAG,kBAAkB,kEAEhH;AACD,wFAAwF;AACxF,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,+BAA+B,GACvC,kBAAkB,CAAC,kCAAkC,CAAC,CAOxD"}
@@ -0,0 +1,21 @@
1
+ import { filterQueryOptions as e } from "../../shared/utils/query.js";
2
+ import { checkListingTokenSupport as t } from "./check-listing-token-support.js";
3
+ //#region src/pools/token-support/query.ts
4
+ function n(t) {
5
+ return ["checkListingTokenSupport", e({ ...t })];
6
+ }
7
+ function r(e, r) {
8
+ return {
9
+ ...r.query,
10
+ queryKey: n({
11
+ ...r,
12
+ configKey: e.getChainConfigKey(r.chainId)
13
+ }),
14
+ enabled: (r.query?.enabled ?? !0) && !!r.tokenContractAddress && !!r.accessToken,
15
+ queryFn: () => t(e, r)
16
+ };
17
+ }
18
+ //#endregion
19
+ export { n as checkListingTokenSupportQueryKey, r as checkListingTokenSupportQueryOptions };
20
+
21
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","names":[],"sources":["../../../src/pools/token-support/query.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport type { ConfigKeyParameter } from \"../../shared/types/properties\";\nimport type { QueryParameter, SymmioQueryOptions } from \"../../shared/types/query\";\nimport { filterQueryOptions } from \"../../shared/utils/query\";\nimport {\n checkListingTokenSupport,\n type CheckListingTokenSupportParameters,\n type CheckListingTokenSupportReturnType,\n} from \"./check-listing-token-support\";\n\n/** Query options for {@link checkListingTokenSupport}. */\nexport type CheckListingTokenSupportOptions = CheckListingTokenSupportParameters &\n QueryParameter<CheckListingTokenSupportReturnType>;\n/** Stable cache identity, including deployment configuration. */\nexport function checkListingTokenSupportQueryKey(options: CheckListingTokenSupportParameters & ConfigKeyParameter) {\n return [\"checkListingTokenSupport\", filterQueryOptions({ ...options })] as const;\n}\n/** Build options for the listing read. Required identity/auth inputs gate execution. */\nexport function checkListingTokenSupportQueryOptions(\n config: Config,\n options: CheckListingTokenSupportOptions,\n): SymmioQueryOptions<CheckListingTokenSupportReturnType> {\n return {\n ...options.query,\n queryKey: checkListingTokenSupportQueryKey({ ...options, configKey: config.getChainConfigKey(options.chainId) }),\n enabled: (options.query?.enabled ?? true) && !!options.tokenContractAddress && !!options.accessToken,\n queryFn: () => checkListingTokenSupport(config, options),\n };\n}\n"],"mappings":";;;AAcA,SAAgB,EAAiC,GAAkE;CACjH,OAAO,CAAC,4BAA4B,EAAmB,EAAE,GAAG,EAAQ,CAAC,CAAC;AACxE;AAEA,SAAgB,EACd,GACA,GACwD;CACxD,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAAiC;GAAE,GAAG;GAAS,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EAAE,CAAC;EAC/G,UAAU,EAAQ,OAAO,WAAW,OAAS,CAAC,CAAC,EAAQ,wBAAwB,CAAC,CAAC,EAAQ;EACzF,eAAe,EAAyB,GAAQ,CAAO;CACzD;AACF"}
@@ -0,0 +1,12 @@
1
+ import { PoolQuote } from '../types.js';
2
+ /** Internal projection of an already snapshot-applied history quote. Unknown source amounts remain null. */
3
+ export declare function calculateHistoryMetrics(quote: PoolQuote): {
4
+ closeQuantity: bigint | null;
5
+ closePrice: bigint | null;
6
+ tradeValue: bigint | null;
7
+ openFee: bigint | null;
8
+ closeFee: bigint | null;
9
+ platformFee: bigint | null;
10
+ realizedPnl: bigint | null;
11
+ };
12
+ //# sourceMappingURL=calculate-history-metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculate-history-metrics.d.ts","sourceRoot":"","sources":["../../../src/pools/trade-history/calculate-history-metrics.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,4GAA4G;AAC5G,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS;;;;;;;;EA2CvD"}
@@ -0,0 +1,36 @@
1
+ import { PositionType as e, QuoteStatus as t } from "../../symmio-contracts/symmio/types.js";
2
+ import { calculateClosePlatformFee as n } from "../../quotes/fees/calculate-close-platform-fee.js";
3
+ import { calculateOpenPlatformFee as r } from "../../quotes/fees/calculate-open-platform-fee.js";
4
+ import { calculateQuotePnl as i } from "../../quotes/upnl/calculate-quote-pnl.js";
5
+ import { parseUnits as a } from "viem";
6
+ //#region src/pools/trade-history/calculate-history-metrics.ts
7
+ function o(o) {
8
+ let s = o.quoteStatus === t.LIQUIDATED, c = s ? o.liquidateAmount ?? o.closedAmount ?? o.quantity : o.closedAmount ?? o.quantity, l = s ? o.liquidatePrice : o.averageClosedPrice ?? o.closedPrice ?? null, u = o.initialOpenedPrice != null && o.initialOpenedPrice > 0n ? o.initialOpenedPrice : o.openedPrice, d = c == null || u == null || o.tradingFee == null ? null : r({
9
+ quantity: c,
10
+ openedPrice: u,
11
+ openFeeRate: o.tradingFee
12
+ }), f = s ? 0n : c == null || l == null || o.closeFee == null ? null : n({
13
+ quantity: c,
14
+ closePrice: l,
15
+ closeFeeRate: o.closeFee
16
+ }), p = o.positionType, m = c == null || l == null || o.openedPrice == null || p !== e.LONG && p !== e.SHORT ? null : a(i({
17
+ positionType: p,
18
+ closedAmount: c,
19
+ closedPrice: l,
20
+ openedPrice: o.openedPrice,
21
+ leverage: "1"
22
+ }).pnl, 18);
23
+ return {
24
+ closeQuantity: c,
25
+ closePrice: l,
26
+ tradeValue: c == null || l == null ? null : c * l / 10n ** 18n,
27
+ openFee: d,
28
+ closeFee: f,
29
+ platformFee: d == null || f == null ? null : d + f,
30
+ realizedPnl: m
31
+ };
32
+ }
33
+ //#endregion
34
+ export { o as calculateHistoryMetrics };
35
+
36
+ //# sourceMappingURL=calculate-history-metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculate-history-metrics.js","names":[],"sources":["../../../src/pools/trade-history/calculate-history-metrics.ts"],"sourcesContent":["import { parseUnits } from \"viem\";\nimport { calculateClosePlatformFee } from \"../../quotes/fees/calculate-close-platform-fee\";\nimport { calculateOpenPlatformFee } from \"../../quotes/fees/calculate-open-platform-fee\";\nimport { calculateQuotePnl } from \"../../quotes/upnl/calculate-quote-pnl\";\nimport { PositionType, QuoteStatus } from \"../../symmio-contracts/symmio/types\";\nimport type { PoolQuote } from \"../types\";\n\n/** Internal projection of an already snapshot-applied history quote. Unknown source amounts remain null. */\nexport function calculateHistoryMetrics(quote: PoolQuote) {\n const liquidated = quote.quoteStatus === QuoteStatus.LIQUIDATED;\n const closeQuantity = liquidated\n ? (quote.liquidateAmount ?? quote.closedAmount ?? quote.quantity)\n : (quote.closedAmount ?? quote.quantity);\n const closePrice = liquidated ? quote.liquidatePrice : (quote.averageClosedPrice ?? quote.closedPrice ?? null);\n const fillPrice =\n quote.initialOpenedPrice != null && quote.initialOpenedPrice > 0n ? quote.initialOpenedPrice : quote.openedPrice;\n const openFee =\n closeQuantity == null || fillPrice == null || quote.tradingFee == null\n ? null\n : calculateOpenPlatformFee({ quantity: closeQuantity, openedPrice: fillPrice, openFeeRate: quote.tradingFee });\n const closeFee = liquidated\n ? 0n\n : closeQuantity == null || closePrice == null || quote.closeFee == null\n ? null\n : calculateClosePlatformFee({ quantity: closeQuantity, closePrice, closeFeeRate: quote.closeFee });\n const positionType = quote.positionType;\n const realizedPnl =\n closeQuantity == null ||\n closePrice == null ||\n quote.openedPrice == null ||\n (positionType !== PositionType.LONG && positionType !== PositionType.SHORT)\n ? null\n : parseUnits(\n calculateQuotePnl({\n positionType,\n closedAmount: closeQuantity,\n closedPrice: closePrice,\n openedPrice: quote.openedPrice,\n leverage: \"1\",\n }).pnl,\n 18,\n );\n return {\n closeQuantity,\n closePrice,\n tradeValue: closeQuantity == null || closePrice == null ? null : (closeQuantity * closePrice) / 10n ** 18n,\n openFee,\n closeFee,\n platformFee: openFee == null || closeFee == null ? null : openFee + closeFee,\n realizedPnl,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,EAAwB,GAAkB;CACxD,IAAM,IAAa,EAAM,gBAAgB,EAAY,YAC/C,IAAgB,IACjB,EAAM,mBAAmB,EAAM,gBAAgB,EAAM,WACrD,EAAM,gBAAgB,EAAM,UAC3B,IAAa,IAAa,EAAM,iBAAkB,EAAM,sBAAsB,EAAM,eAAe,MACnG,IACJ,EAAM,sBAAsB,QAAQ,EAAM,qBAAqB,KAAK,EAAM,qBAAqB,EAAM,aACjG,IACJ,KAAiB,QAAQ,KAAa,QAAQ,EAAM,cAAc,OAC9D,OACA,EAAyB;EAAE,UAAU;EAAe,aAAa;EAAW,aAAa,EAAM;CAAW,CAAC,GAC3G,IAAW,IACb,KACA,KAAiB,QAAQ,KAAc,QAAQ,EAAM,YAAY,OAC/D,OACA,EAA0B;EAAE,UAAU;EAAe;EAAY,cAAc,EAAM;CAAS,CAAC,GAC/F,IAAe,EAAM,cACrB,IACJ,KAAiB,QACjB,KAAc,QACd,EAAM,eAAe,QACpB,MAAiB,EAAa,QAAQ,MAAiB,EAAa,QACjE,OACA,EACE,EAAkB;EAChB;EACA,cAAc;EACd,aAAa;EACb,aAAa,EAAM;EACnB,UAAU;CACZ,CAAC,EAAE,KACH,EACF;CACN,OAAO;EACL;EACA;EACA,YAAY,KAAiB,QAAQ,KAAc,OAAO,OAAQ,IAAgB,IAAc,OAAO;EACvG;EACA;EACA,aAAa,KAAW,QAAQ,KAAY,OAAO,OAAO,IAAU;EACpE;CACF;AACF"}
@@ -1,6 +1,7 @@
1
1
  import { Config } from '../../core/config/index.js';
2
2
  import { QuoteCloseType, QuoteHistoryRow } from '../../quotes/get-quote-history/types.js';
3
3
  import { ChainIdParameter, Compute } from '../../shared/types/properties.js';
4
+ import { PoolQuote } from '../types.js';
4
5
  /**
5
6
  * Parameters for {@link getPoolTradeHistory}.
6
7
  */
@@ -22,7 +23,26 @@ export type GetPoolTradeHistoryParameters = Compute<ChainIdParameter & {
22
23
  /** Return type of {@link getPoolTradeHistory}. */
23
24
  export interface GetPoolTradeHistoryReturnType {
24
25
  /** The decoded, snapshot-applied history rows (one per close/liquidation event). */
25
- rows: QuoteHistoryRow[];
26
+ rows: PoolTradeHistoryRow[];
27
+ /** Full quote fields with each event snapshot applied, aligned with rows. */
28
+ quotes: PoolQuote[];
29
+ }
30
+ /** One immutable close event with derived 18-decimal amounts. Missing calculation inputs yield null. */
31
+ export interface PoolTradeHistoryRow extends Omit<QuoteHistoryRow, "closeFee"> {
32
+ /** This event's closed/liquidated quantity, otherwise the available quote quantity. */
33
+ closeQuantity: bigint | null;
34
+ /** Event execution price; liquidation uses its own price rather than an earlier average close. */
35
+ closePrice: bigint | null;
36
+ /** Event quantity times execution price, in collateral units. */
37
+ tradeValue: bigint | null;
38
+ /** Opening-fee share attributed to this event's quantity, floored independently per row. */
39
+ openFee: bigint | null;
40
+ /** Event closing fee; zero for liquidation, charged for normal, force, emergency and ADL closes. */
41
+ closeFee: bigint | null;
42
+ /** openFee + closeFee; excludes solver, funding and liquidation fees. */
43
+ platformFee: bigint | null;
44
+ /** Gross realized PnL before fees, from the shared quote primitive. */
45
+ realizedPnl: bigint | null;
26
46
  }
27
47
  /**
28
48
  * Read a **pool's** realized trade history from the analytics subgraph.
@@ -1 +1 @@
1
- {"version":3,"file":"get-pool-trade-history.d.ts","sourceRoot":"","sources":["../../../src/pools/trade-history/get-pool-trade-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAY/E;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CACjD,gBAAgB,GAAG;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,qDAAqD;IACrD,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACjC,CACF,CAAC;AAEF,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,oFAAoF;IACpF,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CA0BxC"}
1
+ {"version":3,"file":"get-pool-trade-history.d.ts","sourceRoot":"","sources":["../../../src/pools/trade-history/get-pool-trade-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAQ/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAO1C;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CACjD,gBAAgB,GAAG;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,qDAAqD;IACrD,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,cAAc,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACjC,CACF,CAAC;AAEF,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,oFAAoF;IACpF,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,6EAA6E;IAC7E,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,wGAAwG;AACxG,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IAC5E,uFAAuF;IACvF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kGAAkG;IAClG,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iEAAiE;IACjE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,4FAA4F;IAC5F,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,oGAAoG;IACpG,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,uEAAuE;IACvE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CAmDxC"}
@@ -1,27 +1,66 @@
1
1
  import { querySubgraph as e } from "../../symmio-subgraph/query-subgraph/query-subgraph.js";
2
2
  import { QuoteCloseType as t } from "../../quotes/get-quote-history/types.js";
3
- import { closeTypeToEventTypes as n } from "../../quotes/get-quote-history/close-type.js";
4
- import { toQuoteHistoryRow as r } from "../../quotes/get-quote-history/to-history-row.js";
5
- import { resolvePoolSource as i } from "../resolve-pool-source.js";
6
- import { PoolQuoteEventsDocument as a } from "./query-document.js";
3
+ import { LIQUIDATION_EVENT_TYPES as n, closeTypeToEventTypes as r } from "../../quotes/get-quote-history/close-type.js";
4
+ import { toQuoteHistoryRow as i } from "../../quotes/get-quote-history/to-history-row.js";
5
+ import { resolvePoolSource as a } from "../resolve-pool-source.js";
6
+ import { toPoolQuote as o } from "../quotes/to-pool-quote.js";
7
+ import { calculateHistoryMetrics as s } from "./calculate-history-metrics.js";
8
+ import { PoolQuoteEventsDocument as c } from "./query-document.js";
7
9
  //#region src/pools/trade-history/get-pool-trade-history.ts
8
- var o = 50;
9
- async function s(s, c) {
10
- let { chainId: l, symbolId: u, closeType: d = t.All, first: f = o, skip: p = 0, orderDirection: m = "desc" } = c;
11
- return u == null ? { rows: [] } : { rows: ((await e(s, {
12
- chainId: l,
13
- document: a,
10
+ var l = 50;
11
+ async function u(u, f) {
12
+ let { chainId: p, symbolId: m, closeType: h = t.All, first: g = l, skip: _ = 0, orderDirection: v = "desc" } = f;
13
+ if (m == null) return {
14
+ rows: [],
15
+ quotes: []
16
+ };
17
+ let y = await e(u, {
18
+ chainId: p,
19
+ document: c,
14
20
  variables: {
15
- typeIn: n[d],
16
- symbolId: String(u),
17
- source: i(s, l),
18
- first: f,
19
- skip: p,
20
- orderDirection: m
21
+ typeIn: r[h],
22
+ symbolId: String(m),
23
+ source: a(u, p),
24
+ first: g,
25
+ skip: _,
26
+ orderDirection: v
21
27
  }
22
- })).quoteEvents ?? []).map(r) };
28
+ }), b = (y.quoteEvents ?? []).map(i), x = (y.quoteEvents ?? []).map((e, t) => {
29
+ let r = b[t], i = o(e.quote), a = {};
30
+ try {
31
+ let t = JSON.parse(e.metadata ?? "{}");
32
+ t && typeof t == "object" && (a = t);
33
+ } catch {}
34
+ let s = d(a.amount), c = d(a.closePrice), l = n.has(r.closeEventType);
35
+ return {
36
+ ...i,
37
+ quoteStatus: r.quoteStatus,
38
+ openedPrice: d(a.openedPrice) ?? i.openedPrice,
39
+ closedAmount: s ?? i.closedAmount,
40
+ quantityToClose: s ?? i.quantityToClose,
41
+ averageClosedPrice: c ?? i.averageClosedPrice,
42
+ liquidateAmount: (l ? s : null) ?? i.liquidateAmount,
43
+ liquidatePrice: (l ? c : null) ?? i.liquidatePrice
44
+ };
45
+ });
46
+ return {
47
+ rows: b.map((e, t) => ({
48
+ ...e,
49
+ ...s(x[t])
50
+ })),
51
+ quotes: x
52
+ };
53
+ }
54
+ function d(e) {
55
+ if (typeof e != "string" && typeof e != "number" || typeof e == "string" && e.trim() === "") return null;
56
+ try {
57
+ let t = BigInt(e);
58
+ return t >= 0n ? t : null;
59
+ } catch {
60
+ return null;
61
+ }
23
62
  }
24
63
  //#endregion
25
- export { s as getPoolTradeHistory };
64
+ export { u as getPoolTradeHistory };
26
65
 
27
66
  //# sourceMappingURL=get-pool-trade-history.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-pool-trade-history.js","names":[],"sources":["../../../src/pools/trade-history/get-pool-trade-history.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport { closeTypeToEventTypes } from \"../../quotes/get-quote-history/close-type\";\nimport { toQuoteHistoryRow } from \"../../quotes/get-quote-history/to-history-row\";\nimport { QuoteCloseType, type QuoteHistoryRow } from \"../../quotes/get-quote-history/types\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport { querySubgraph } from \"../../symmio-subgraph/query-subgraph\";\nimport type {\n PoolQuoteEventsQuery,\n PoolQuoteEventsQueryVariables,\n} from \"../../symmio-subgraph/types/generated/analytics/graphql\";\nimport { resolvePoolSource } from \"../resolve-pool-source\";\nimport { PoolQuoteEventsDocument } from \"./query-document\";\n\n/** Page size when the caller does not specify one. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Parameters for {@link getPoolTradeHistory}.\n */\nexport type GetPoolTradeHistoryParameters = Compute<\n ChainIdParameter & {\n /**\n * The pool's solver market id. A pool with no `symbolId` is not tradable and\n * has no history — the action short-circuits to an empty result.\n */\n symbolId: number | null | undefined;\n /** Close-type filter. @default QuoteCloseType.All */\n closeType?: QuoteCloseType;\n /** Page size. @default 50 */\n first?: number;\n /** Page offset. @default 0 */\n skip?: number;\n /** Sort direction on the event timestamp. @default \"desc\" */\n orderDirection?: \"asc\" | \"desc\";\n }\n>;\n\n/** Return type of {@link getPoolTradeHistory}. */\nexport interface GetPoolTradeHistoryReturnType {\n /** The decoded, snapshot-applied history rows (one per close/liquidation event). */\n rows: QuoteHistoryRow[];\n}\n\n/**\n * Read a **pool's** realized trade history from the analytics subgraph.\n *\n * The pool-scoped counterpart to `getQuoteHistory`: that one filters by the\n * accounts you pass, this one filters by the market and the SYMMIO diamond the\n * quotes were opened against, with no account clause at all. The result is every\n * trader's closes on this pool, which is what a pool page shows.\n *\n * Rows come from the immutable `quoteEvents` collection with each event's frozen\n * `metadata` snapshot overlaid, so a quote closed across several partial closes\n * yields several individually-accurate rows rather than repeating its final\n * state.\n *\n * @param config - The SDK config.\n * @param parameters - The pool's `symbolId`, optional close-type filter, paging and sort.\n * @returns The history rows; empty when `symbolId` is absent.\n * @throws {SymmError} when the chain is unsupported or has no analytics subgraph.\n * @throws {SymmApiError} when the subgraph request fails.\n *\n * @example\n * ```ts\n * const { rows } = await getPoolTradeHistory(config, { symbolId: 1, first: 25 });\n * ```\n */\nexport async function getPoolTradeHistory(\n config: Config,\n parameters: GetPoolTradeHistoryParameters,\n): Promise<GetPoolTradeHistoryReturnType> {\n const {\n chainId,\n symbolId,\n closeType = QuoteCloseType.All,\n first = DEFAULT_PAGE_SIZE,\n skip = 0,\n orderDirection = \"desc\",\n } = parameters;\n\n if (symbolId === null || symbolId === undefined) return { rows: [] };\n\n const data = await querySubgraph<PoolQuoteEventsQuery, PoolQuoteEventsQueryVariables>(config, {\n chainId,\n document: PoolQuoteEventsDocument,\n variables: {\n typeIn: closeTypeToEventTypes[closeType] as string[],\n symbolId: String(symbolId),\n source: resolvePoolSource(config, chainId),\n first,\n skip,\n orderDirection,\n },\n });\n\n return { rows: (data.quoteEvents ?? []).map(toQuoteHistoryRow) };\n}\n"],"mappings":";;;;;;;AAcA,IAAM,IAAoB;AAqD1B,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EACJ,YACA,aACA,eAAY,EAAe,KAC3B,WAAQ,GACR,UAAO,GACP,oBAAiB,WACf;CAiBJ,OAfI,KAAa,OAAuC,EAAE,MAAM,CAAC,EAAE,IAe5D,EAAE,QAAO,MAbG,EAAmE,GAAQ;EAC5F;EACA,UAAU;EACV,WAAW;GACT,QAAQ,EAAsB;GAC9B,UAAU,OAAO,CAAQ;GACzB,QAAQ,EAAkB,GAAQ,CAAO;GACzC;GACA;GACA;EACF;CACF,CAAC,GAEoB,eAAe,CAAC,GAAG,IAAI,CAAiB,EAAE;AACjE"}
1
+ {"version":3,"file":"get-pool-trade-history.js","names":[],"sources":["../../../src/pools/trade-history/get-pool-trade-history.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport { closeTypeToEventTypes, LIQUIDATION_EVENT_TYPES } from \"../../quotes/get-quote-history/close-type\";\nimport { toQuoteHistoryRow } from \"../../quotes/get-quote-history/to-history-row\";\nimport { QuoteCloseType, type QuoteHistoryRow } from \"../../quotes/get-quote-history/types\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport { querySubgraph } from \"../../symmio-subgraph/query-subgraph\";\nimport type {\n PoolQuoteEventsQuery,\n PoolQuoteEventsQueryVariables,\n} from \"../../symmio-subgraph/types/generated/analytics/graphql\";\nimport { toPoolQuote } from \"../quotes/to-pool-quote\";\nimport { resolvePoolSource } from \"../resolve-pool-source\";\nimport type { PoolQuote } from \"../types\";\nimport { calculateHistoryMetrics } from \"./calculate-history-metrics\";\nimport { PoolQuoteEventsDocument } from \"./query-document\";\n\n/** Page size when the caller does not specify one. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Parameters for {@link getPoolTradeHistory}.\n */\nexport type GetPoolTradeHistoryParameters = Compute<\n ChainIdParameter & {\n /**\n * The pool's solver market id. A pool with no `symbolId` is not tradable and\n * has no history — the action short-circuits to an empty result.\n */\n symbolId: number | null | undefined;\n /** Close-type filter. @default QuoteCloseType.All */\n closeType?: QuoteCloseType;\n /** Page size. @default 50 */\n first?: number;\n /** Page offset. @default 0 */\n skip?: number;\n /** Sort direction on the event timestamp. @default \"desc\" */\n orderDirection?: \"asc\" | \"desc\";\n }\n>;\n\n/** Return type of {@link getPoolTradeHistory}. */\nexport interface GetPoolTradeHistoryReturnType {\n /** The decoded, snapshot-applied history rows (one per close/liquidation event). */\n rows: PoolTradeHistoryRow[];\n /** Full quote fields with each event snapshot applied, aligned with rows. */\n quotes: PoolQuote[];\n}\n\n/** One immutable close event with derived 18-decimal amounts. Missing calculation inputs yield null. */\nexport interface PoolTradeHistoryRow extends Omit<QuoteHistoryRow, \"closeFee\"> {\n /** This event's closed/liquidated quantity, otherwise the available quote quantity. */\n closeQuantity: bigint | null;\n /** Event execution price; liquidation uses its own price rather than an earlier average close. */\n closePrice: bigint | null;\n /** Event quantity times execution price, in collateral units. */\n tradeValue: bigint | null;\n /** Opening-fee share attributed to this event's quantity, floored independently per row. */\n openFee: bigint | null;\n /** Event closing fee; zero for liquidation, charged for normal, force, emergency and ADL closes. */\n closeFee: bigint | null;\n /** openFee + closeFee; excludes solver, funding and liquidation fees. */\n platformFee: bigint | null;\n /** Gross realized PnL before fees, from the shared quote primitive. */\n realizedPnl: bigint | null;\n}\n\n/**\n * Read a **pool's** realized trade history from the analytics subgraph.\n *\n * The pool-scoped counterpart to `getQuoteHistory`: that one filters by the\n * accounts you pass, this one filters by the market and the SYMMIO diamond the\n * quotes were opened against, with no account clause at all. The result is every\n * trader's closes on this pool, which is what a pool page shows.\n *\n * Rows come from the immutable `quoteEvents` collection with each event's frozen\n * `metadata` snapshot overlaid, so a quote closed across several partial closes\n * yields several individually-accurate rows rather than repeating its final\n * state.\n *\n * @param config - The SDK config.\n * @param parameters - The pool's `symbolId`, optional close-type filter, paging and sort.\n * @returns The history rows; empty when `symbolId` is absent.\n * @throws {SymmError} when the chain is unsupported or has no analytics subgraph.\n * @throws {SymmApiError} when the subgraph request fails.\n *\n * @example\n * ```ts\n * const { rows } = await getPoolTradeHistory(config, { symbolId: 1, first: 25 });\n * ```\n */\nexport async function getPoolTradeHistory(\n config: Config,\n parameters: GetPoolTradeHistoryParameters,\n): Promise<GetPoolTradeHistoryReturnType> {\n const {\n chainId,\n symbolId,\n closeType = QuoteCloseType.All,\n first = DEFAULT_PAGE_SIZE,\n skip = 0,\n orderDirection = \"desc\",\n } = parameters;\n\n if (symbolId === null || symbolId === undefined) return { rows: [], quotes: [] };\n\n const data = await querySubgraph<PoolQuoteEventsQuery, PoolQuoteEventsQueryVariables>(config, {\n chainId,\n document: PoolQuoteEventsDocument,\n variables: {\n typeIn: closeTypeToEventTypes[closeType] as string[],\n symbolId: String(symbolId),\n source: resolvePoolSource(config, chainId),\n first,\n skip,\n orderDirection,\n },\n });\n\n const rows = (data.quoteEvents ?? []).map(toQuoteHistoryRow);\n const quotes = (data.quoteEvents ?? []).map((event, index) => {\n const snapshot = rows[index]!;\n const quote = toPoolQuote(event.quote);\n let metadata: Record<string, unknown> = {};\n try {\n const parsed: unknown = JSON.parse(event.metadata ?? \"{}\");\n if (parsed && typeof parsed === \"object\") metadata = parsed as Record<string, unknown>;\n } catch {\n /* Missing snapshot keeps the nullable quote fields. */\n }\n const amount = snapshotWei(metadata.amount);\n const closePrice = snapshotWei(metadata.closePrice);\n const isLiquidation = LIQUIDATION_EVENT_TYPES.has(snapshot.closeEventType);\n return {\n ...quote,\n quoteStatus: snapshot.quoteStatus,\n openedPrice: snapshotWei(metadata.openedPrice) ?? quote.openedPrice,\n closedAmount: amount ?? quote.closedAmount,\n quantityToClose: amount ?? quote.quantityToClose,\n averageClosedPrice: closePrice ?? quote.averageClosedPrice,\n liquidateAmount: (isLiquidation ? amount : null) ?? quote.liquidateAmount,\n liquidatePrice: (isLiquidation ? closePrice : null) ?? quote.liquidatePrice,\n };\n });\n return { rows: rows.map((row, index) => ({ ...row, ...calculateHistoryMetrics(quotes[index]!) })), quotes };\n}\n\nfunction snapshotWei(value: unknown): bigint | null {\n if (typeof value !== \"string\" && typeof value !== \"number\") return null;\n if (typeof value === \"string\" && value.trim() === \"\") return null;\n try {\n const amount = BigInt(value);\n return amount >= 0n ? amount : null;\n } catch {\n return null;\n }\n}\n"],"mappings":";;;;;;;;;AAiBA,IAAM,IAAoB;AAyE1B,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EACJ,YACA,aACA,eAAY,EAAe,KAC3B,WAAQ,GACR,UAAO,GACP,oBAAiB,WACf;CAEJ,IAAI,KAAa,MAAgC,OAAO;EAAE,MAAM,CAAC;EAAG,QAAQ,CAAC;CAAE;CAE/E,IAAM,IAAO,MAAM,EAAmE,GAAQ;EAC5F;EACA,UAAU;EACV,WAAW;GACT,QAAQ,EAAsB;GAC9B,UAAU,OAAO,CAAQ;GACzB,QAAQ,EAAkB,GAAQ,CAAO;GACzC;GACA;GACA;EACF;CACF,CAAC,GAEK,KAAQ,EAAK,eAAe,CAAC,GAAG,IAAI,CAAiB,GACrD,KAAU,EAAK,eAAe,CAAC,GAAG,KAAK,GAAO,MAAU;EAC5D,IAAM,IAAW,EAAK,IAChB,IAAQ,EAAY,EAAM,KAAK,GACjC,IAAoC,CAAC;EACzC,IAAI;GACF,IAAM,IAAkB,KAAK,MAAM,EAAM,YAAY,IAAI;GACzD,AAAI,KAAU,OAAO,KAAW,aAAU,IAAW;EACvD,QAAQ,CAER;EACA,IAAM,IAAS,EAAY,EAAS,MAAM,GACpC,IAAa,EAAY,EAAS,UAAU,GAC5C,IAAgB,EAAwB,IAAI,EAAS,cAAc;EACzE,OAAO;GACL,GAAG;GACH,aAAa,EAAS;GACtB,aAAa,EAAY,EAAS,WAAW,KAAK,EAAM;GACxD,cAAc,KAAU,EAAM;GAC9B,iBAAiB,KAAU,EAAM;GACjC,oBAAoB,KAAc,EAAM;GACxC,kBAAkB,IAAgB,IAAS,SAAS,EAAM;GAC1D,iBAAiB,IAAgB,IAAa,SAAS,EAAM;EAC/D;CACF,CAAC;CACD,OAAO;EAAE,MAAM,EAAK,KAAK,GAAK,OAAW;GAAE,GAAG;GAAK,GAAG,EAAwB,EAAO,EAAO;EAAE,EAAE;EAAG;CAAO;AAC5G;AAEA,SAAS,EAAY,GAA+B;CAElD,IADI,OAAO,KAAU,YAAY,OAAO,KAAU,YAC9C,OAAO,KAAU,YAAY,EAAM,KAAK,MAAM,IAAI,OAAO;CAC7D,IAAI;EACF,IAAM,IAAS,OAAO,CAAK;EAC3B,OAAO,KAAU,KAAK,IAAS;CACjC,QAAQ;EACN,OAAO;CACT;AACF"}
@@ -7,6 +7,9 @@
7
7
  * distinct. Scoped to the pool by the quote's `symbolId` and `source`, with no
8
8
  * account filter: this is the whole pool's history.
9
9
  *
10
+ * The selection matches `QuoteEventsForHistoryDocument` field for field, because
11
+ * both decode through `toQuoteHistoryRow` into the same `QuoteHistoryRow`.
12
+ *
10
13
  * The document compiles to a typed query string via graphql-codegen.
11
14
  */
12
15
  export declare const PoolQuoteEventsDocument: import('../../symmio-subgraph/types/generated/analytics/graphql.js').TypedDocumentString<import('../../symmio-subgraph/types/generated/analytics/graphql.js').PoolQuoteEventsQuery, {
@@ -1 +1 @@
1
- {"version":3,"file":"query-document.d.ts","sourceRoot":"","sources":["../../../src/pools/trade-history/query-document.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB;;;;;;;EA+ClC,CAAC"}
1
+ {"version":3,"file":"query-document.d.ts","sourceRoot":"","sources":["../../../src/pools/trade-history/query-document.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;;;;;;;EAyElC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { graphql as e } from "../../symmio-subgraph/types/generated/analytics/gql.js";
2
2
  //#region src/pools/trade-history/query-document.ts
3
- var t = e("\n query PoolQuoteEvents(\n $typeIn: [String!]!\n $symbolId: BigInt!\n $source: Bytes!\n $first: Int!\n $skip: Int!\n $orderDirection: OrderDirection!\n ) {\n quoteEvents(\n first: $first\n skip: $skip\n orderBy: timestamp\n orderDirection: $orderDirection\n where: { type_in: $typeIn, quote_: { symbolId: $symbolId, source: $source } }\n ) {\n id\n type\n metadata\n timestamp\n quoteId\n blockNumber\n transaction\n quote {\n quoteId\n quoteStatus\n positionType\n orderTypeOpen\n symbol\n symbolId\n partyA\n partyB\n subAccount {\n id\n }\n quantity\n openedPrice\n requestedOpenPrice\n averageClosedPrice\n closePrice\n closedAmount\n quantityToClose\n liquidateAmount\n liquidatePrice\n }\n }\n }\n");
3
+ var t = e("\n query PoolQuoteEvents(\n $typeIn: [String!]!\n $symbolId: BigInt!\n $source: Bytes!\n $first: Int!\n $skip: Int!\n $orderDirection: OrderDirection!\n ) {\n quoteEvents(\n first: $first\n skip: $skip\n orderBy: timestamp\n orderDirection: $orderDirection\n where: { type_in: $typeIn, quote_: { symbolId: $symbolId, source: $source } }\n ) {\n id\n type\n metadata\n timestamp\n quoteId\n blockNumber\n transaction\n source\n quote {\n id\n timestamp\n blockNumber\n userPaidFunding\n userReceivedFunding\n quoteId\n quoteStatus\n positionType\n orderTypeOpen\n symbol\n symbolId\n partyA\n partyB\n subAccount {\n id\n owner\n }\n quantity\n openedPrice\n initialOpenedPrice\n requestedOpenPrice\n marketPrice\n averageClosedPrice\n closePrice\n closedPrice\n closedAmount\n quantityToClose\n liquidateAmount\n liquidatePrice\n tradingFee\n closeFee\n leverage\n cva\n lf\n initialCva\n initialLf\n initialPartyAmm\n timestampSendQuote\n timestampOpenPosition\n sendQuoteEvents: quoteEvents(where: { type: \"SEND_QUOTE\" }, first: 1) {\n transaction\n }\n openPositionEvents: quoteEvents(where: { type: \"OPEN_POSITION\" }, first: 1000) {\n metadata\n }\n }\n }\n }\n");
4
4
  //#endregion
5
5
  export { t as PoolQuoteEventsDocument };
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"query-document.js","names":[],"sources":["../../../src/pools/trade-history/query-document.ts"],"sourcesContent":["import { graphql } from \"../../symmio-subgraph/types/generated/analytics\";\n\n/**\n * A pool's realized trade history, from the analytics subgraph.\n *\n * Reads the immutable `quoteEvents` collection rather than `quotes`, so a quote\n * closed across several partial closes yields one row per close — each with the\n * frozen `metadata` snapshot of that close, which is what makes the rows\n * distinct. Scoped to the pool by the quote's `symbolId` and `source`, with no\n * account filter: this is the whole pool's history.\n *\n * The document compiles to a typed query string via graphql-codegen.\n */\nexport const PoolQuoteEventsDocument = graphql(`\n query PoolQuoteEvents(\n $typeIn: [String!]!\n $symbolId: BigInt!\n $source: Bytes!\n $first: Int!\n $skip: Int!\n $orderDirection: OrderDirection!\n ) {\n quoteEvents(\n first: $first\n skip: $skip\n orderBy: timestamp\n orderDirection: $orderDirection\n where: { type_in: $typeIn, quote_: { symbolId: $symbolId, source: $source } }\n ) {\n id\n type\n metadata\n timestamp\n quoteId\n blockNumber\n transaction\n quote {\n quoteId\n quoteStatus\n positionType\n orderTypeOpen\n symbol\n symbolId\n partyA\n partyB\n subAccount {\n id\n }\n quantity\n openedPrice\n requestedOpenPrice\n averageClosedPrice\n closePrice\n closedAmount\n quantityToClose\n liquidateAmount\n liquidatePrice\n }\n }\n }\n`);\n"],"mappings":";;AAaA,IAAa,IAA0B,EAAQ,o7BA+C9C"}
1
+ {"version":3,"file":"query-document.js","names":[],"sources":["../../../src/pools/trade-history/query-document.ts"],"sourcesContent":["import { graphql } from \"../../symmio-subgraph/types/generated/analytics\";\n\n/**\n * A pool's realized trade history, from the analytics subgraph.\n *\n * Reads the immutable `quoteEvents` collection rather than `quotes`, so a quote\n * closed across several partial closes yields one row per close — each with the\n * frozen `metadata` snapshot of that close, which is what makes the rows\n * distinct. Scoped to the pool by the quote's `symbolId` and `source`, with no\n * account filter: this is the whole pool's history.\n *\n * The selection matches `QuoteEventsForHistoryDocument` field for field, because\n * both decode through `toQuoteHistoryRow` into the same `QuoteHistoryRow`.\n *\n * The document compiles to a typed query string via graphql-codegen.\n */\nexport const PoolQuoteEventsDocument = graphql(`\n query PoolQuoteEvents(\n $typeIn: [String!]!\n $symbolId: BigInt!\n $source: Bytes!\n $first: Int!\n $skip: Int!\n $orderDirection: OrderDirection!\n ) {\n quoteEvents(\n first: $first\n skip: $skip\n orderBy: timestamp\n orderDirection: $orderDirection\n where: { type_in: $typeIn, quote_: { symbolId: $symbolId, source: $source } }\n ) {\n id\n type\n metadata\n timestamp\n quoteId\n blockNumber\n transaction\n source\n quote {\n id\n timestamp\n blockNumber\n userPaidFunding\n userReceivedFunding\n quoteId\n quoteStatus\n positionType\n orderTypeOpen\n symbol\n symbolId\n partyA\n partyB\n subAccount {\n id\n owner\n }\n quantity\n openedPrice\n initialOpenedPrice\n requestedOpenPrice\n marketPrice\n averageClosedPrice\n closePrice\n closedPrice\n closedAmount\n quantityToClose\n liquidateAmount\n liquidatePrice\n tradingFee\n closeFee\n leverage\n cva\n lf\n initialCva\n initialLf\n initialPartyAmm\n timestampSendQuote\n timestampOpenPosition\n sendQuoteEvents: quoteEvents(where: { type: \"SEND_QUOTE\" }, first: 1) {\n transaction\n }\n openPositionEvents: quoteEvents(where: { type: \"OPEN_POSITION\" }, first: 1000) {\n metadata\n }\n }\n }\n }\n`);\n"],"mappings":";;AAgBA,IAAa,IAA0B,EAAQ,+jDAyE9C"}
@@ -0,0 +1,6 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { PoolTransactionPage } from '../types.js';
3
+ import { GetPoolTransactionsParameters } from './get-pool-transactions.js';
4
+ /** Read a requested history range through the service's 50-row page cap. Stop on a short page or the reported total. */
5
+ export declare function getPoolTransactionRange(config: Config, parameters: GetPoolTransactionsParameters): Promise<PoolTransactionPage>;
6
+ //# sourceMappingURL=get-pool-transaction-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pool-transaction-range.d.ts","sourceRoot":"","sources":["../../../src/pools/transactions/get-pool-transaction-range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAuB,KAAK,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAElG,wHAAwH;AACxH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,mBAAmB,CAAC,CAkB9B"}
@@ -0,0 +1,26 @@
1
+ import { getPoolTransactions as e } from "./get-pool-transactions.js";
2
+ //#region src/pools/transactions/get-pool-transaction-range.ts
3
+ async function t(t, n) {
4
+ let { start: r = 0, size: i = 50 } = n, a = await e(t, {
5
+ ...n,
6
+ start: r,
7
+ size: Math.min(i, 50)
8
+ }), o = [...a.items], s = a.items.length, c = Math.min(i, 50);
9
+ for (; s === c && c > 0 && o.length < i && r + o.length < a.count;) {
10
+ c = Math.min(i - o.length, 50);
11
+ let a = await e(t, {
12
+ ...n,
13
+ start: r + o.length,
14
+ size: c
15
+ });
16
+ s = a.items.length, o.push(...a.items);
17
+ }
18
+ return {
19
+ ...a,
20
+ items: o
21
+ };
22
+ }
23
+ //#endregion
24
+ export { t as getPoolTransactionRange };
25
+
26
+ //# sourceMappingURL=get-pool-transaction-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pool-transaction-range.js","names":[],"sources":["../../../src/pools/transactions/get-pool-transaction-range.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport type { PoolTransactionPage } from \"../types\";\nimport { getPoolTransactions, type GetPoolTransactionsParameters } from \"./get-pool-transactions\";\n\n/** Read a requested history range through the service's 50-row page cap. Stop on a short page or the reported total. */\nexport async function getPoolTransactionRange(\n config: Config,\n parameters: GetPoolTransactionsParameters,\n): Promise<PoolTransactionPage> {\n const { start = 0, size = 50 } = parameters;\n const first = await getPoolTransactions(config, { ...parameters, start, size: Math.min(size, 50) });\n const items = [...first.items];\n let previousLength = first.items.length;\n let previousLimit = Math.min(size, 50);\n while (\n previousLength === previousLimit &&\n previousLimit > 0 &&\n items.length < size &&\n start + items.length < first.count\n ) {\n previousLimit = Math.min(size - items.length, 50);\n const page = await getPoolTransactions(config, { ...parameters, start: start + items.length, size: previousLimit });\n previousLength = page.items.length;\n items.push(...page.items);\n }\n return { ...first, items };\n}\n"],"mappings":";;AAKA,eAAsB,EACpB,GACA,GAC8B;CAC9B,IAAM,EAAE,WAAQ,GAAG,UAAO,OAAO,GAC3B,IAAQ,MAAM,EAAoB,GAAQ;EAAE,GAAG;EAAY;EAAO,MAAM,KAAK,IAAI,GAAM,EAAE;CAAE,CAAC,GAC5F,IAAQ,CAAC,GAAG,EAAM,KAAK,GACzB,IAAiB,EAAM,MAAM,QAC7B,IAAgB,KAAK,IAAI,GAAM,EAAE;CACrC,OACE,MAAmB,KACnB,IAAgB,KAChB,EAAM,SAAS,KACf,IAAQ,EAAM,SAAS,EAAM,QAC7B;EACA,IAAgB,KAAK,IAAI,IAAO,EAAM,QAAQ,EAAE;EAChD,IAAM,IAAO,MAAM,EAAoB,GAAQ;GAAE,GAAG;GAAY,OAAO,IAAQ,EAAM;GAAQ,MAAM;EAAc,CAAC;EAElH,AADA,IAAiB,EAAK,MAAM,QAC5B,EAAM,KAAK,GAAG,EAAK,KAAK;CAC1B;CACA,OAAO;EAAE,GAAG;EAAO;CAAM;AAC3B"}
@@ -1,3 +1,4 @@
1
+ export * from './get-pool-transaction-range.js';
1
2
  export * from './get-pool-transactions.js';
2
3
  export * from './query.js';
3
4
  export * from './to-pool-transaction.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pools/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pools/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC"}
@@ -30,56 +30,80 @@ var t = (t, n) => e.get("/v2/auth/sign-in-message", {
30
30
  ...t,
31
31
  ...n?.params
32
32
  }
33
- }), f = (t, n) => e.get("/v2/market/search-user", {
33
+ }), f = (t, n) => e.get("/v2/market/token-support", {
34
34
  ...n,
35
35
  params: {
36
36
  ...t,
37
37
  ...n?.params
38
38
  }
39
- }), p = (t, n) => e.get("/v2/market/search", {
39
+ }), p = (t, n) => e.get("/v2/market/token-meta-data", {
40
40
  ...n,
41
41
  params: {
42
42
  ...t,
43
43
  ...n?.params
44
44
  }
45
- }), m = (t, n) => e.post("/v2/market/withdraw", t, n), h = (t, n) => e.delete(`/v2/market/withdraw/${t}`, n), g = (t, n) => e.post("/v2/market/token-price", t, n), _ = (t, n, r, i) => e.get(`/v2/market/transaction-history/${t}/${n}`, {
45
+ }), m = (t, n) => e.get("/v2/market/search-user", {
46
+ ...n,
47
+ params: {
48
+ ...t,
49
+ ...n?.params
50
+ }
51
+ }), h = (t, n) => e.get("/v2/market/search", {
52
+ ...n,
53
+ params: {
54
+ ...t,
55
+ ...n?.params
56
+ }
57
+ }), g = (t, n) => e.post("/v2/market/withdraw", t, n), _ = (t, n) => e.delete(`/v2/market/withdraw/${t}`, n), v = (t, n) => e.post("/v2/market/token-price", t, n), y = (t, n, r, i) => e.get(`/v2/market/transaction-history/${t}/${n}`, {
46
58
  ...i,
47
59
  params: {
48
60
  ...r,
49
61
  ...i?.params
50
62
  }
51
- }), v = (t, n, r, i) => e.get(`/v2/market/user-transactions/${t}/${n}`, {
63
+ }), b = (t, n, r, i) => e.get(`/v2/market/user-transactions/${t}/${n}`, {
52
64
  ...i,
53
65
  params: {
54
66
  ...r,
55
67
  ...i?.params
56
68
  }
57
- }), y = (t, n) => e.get("/v2/market", {
69
+ }), x = (t, n) => e.get("/v2/market", {
70
+ ...n,
71
+ params: {
72
+ ...t,
73
+ ...n?.params
74
+ }
75
+ }), S = (t, n) => e.get("/v2/market/maintenance-fees", {
76
+ ...n,
77
+ params: {
78
+ ...t,
79
+ ...n?.params
80
+ }
81
+ }), C = (t, n) => e.get("/v2/market/listing-status", {
58
82
  ...n,
59
83
  params: {
60
84
  ...t,
61
85
  ...n?.params
62
86
  }
63
- }), b = (t, n) => e.get("/v2/market/listing-status", {
87
+ }), w = (t) => e.get("/v2/market/weekly-listing-limit", t), T = (t, n) => e.get("/v2/pools", {
64
88
  ...n,
65
89
  params: {
66
90
  ...t,
67
91
  ...n?.params
68
92
  }
69
- }), x = (t) => e.get("/v2/market/weekly-listing-limit", t), S = (t, n) => e.post("/v2/claim", t, n), C = (t, n, r, i) => e.get(`/v2/claim/search/${t}/${n}`, {
93
+ }), E = (t, n) => e.post("/v2/claim", t, n), D = (t, n) => e.get(`/v2/claim/${t}`, n), O = (t, n, r, i) => e.get(`/v2/claim/search/${t}/${n}`, {
70
94
  ...i,
71
95
  params: {
72
96
  ...r,
73
97
  ...i?.params
74
98
  }
75
- }), w = (t) => e.get("/v2/configs", t), T = (t) => e.get("/v2/profit/chart/rewards", t), E = (t, n) => e.get("/v2/profit/total-reward", {
99
+ }), k = (t) => e.get("/v2/configs", t), A = (t) => e.get("/v2/profit/chart/rewards", t), j = (t, n) => e.get("/v2/profit/total-reward", {
76
100
  ...n,
77
101
  params: {
78
102
  ...t,
79
103
  ...n?.params
80
104
  }
81
- }), D = (t, n) => e.get(`/v2/profit/${t}`, n);
105
+ }), M = (t, n) => e.get(`/v2/profit/${t}`, n);
82
106
  //#endregion
83
- export { o as addMarketV2MarketAddMarketPost, g as calculateSymbolPriceV2MarketTokenPricePost, h as cancelWithdrawV2MarketWithdrawWithdrawIdDelete, S as claimProfitV2ClaimPost, w as getClientConfigV2ConfigsGet, a as getDepositAddressV2MarketDepositAddressPost, s as getMarketConfigV2MarketConfigGet, b as getMarketListingStatusV2MarketListingStatusGet, r as getMarketRewardChartV2MarketChartRewardsGet, i as getMarketTotalRewardV2MarketTotalRewardGet, y as getMarketV2MarketGet, D as getProfitByTokenV2ProfitTokenContractAddressGet, t as getSignInMessageV2AuthSignInMessageGet, _ as getTransactionHistoryV2MarketTransactionHistoryStartSizeGet, T as getUserRewardChartV2ProfitChartRewardsGet, E as getUserTotalRewardV2ProfitTotalRewardGet, x as getWeeklyListingLimitV2MarketWeeklyListingLimitGet, n as loginV2AuthLoginPost, p as marketSearchV2MarketSearchGet, f as marketUserSearchV2MarketSearchUserGet, C as postSearchClaimsV2ClaimSearchStartSizeGet, u as refundV2MarketRefundPost, l as retryListingV2MarketRetryListingPost, v as searchUserTransactionsV2MarketUserTransactionsStartSizeGet, c as updateMarketConfigV2MarketConfigPost, d as userRetryInfoV2MarketRetryListingInfoGet, m as withdrawV2MarketWithdrawPost };
107
+ export { o as addMarketV2MarketAddMarketPost, v as calculateSymbolPriceV2MarketTokenPricePost, _ as cancelWithdrawV2MarketWithdrawWithdrawIdDelete, f as checkTokenSupportV2MarketTokenSupportGet, E as claimProfitV2ClaimPost, D as getClaimProfitV2ClaimClaimRequestIdGet, k as getClientConfigV2ConfigsGet, a as getDepositAddressV2MarketDepositAddressPost, S as getMaintenanceFeeRecordsV2MarketMaintenanceFeesGet, s as getMarketConfigV2MarketConfigGet, C as getMarketListingStatusV2MarketListingStatusGet, r as getMarketRewardChartV2MarketChartRewardsGet, i as getMarketTotalRewardV2MarketTotalRewardGet, x as getMarketV2MarketGet, T as getPoolsV2PoolsGet, M as getProfitByTokenV2ProfitTokenContractAddressGet, t as getSignInMessageV2AuthSignInMessageGet, p as getTokenMetaDataV2MarketTokenMetaDataGet, y as getTransactionHistoryV2MarketTransactionHistoryStartSizeGet, A as getUserRewardChartV2ProfitChartRewardsGet, j as getUserTotalRewardV2ProfitTotalRewardGet, w as getWeeklyListingLimitV2MarketWeeklyListingLimitGet, n as loginV2AuthLoginPost, h as marketSearchV2MarketSearchGet, m as marketUserSearchV2MarketSearchUserGet, O as postSearchClaimsV2ClaimSearchStartSizeGet, u as refundV2MarketRefundPost, l as retryListingV2MarketRetryListingPost, b as searchUserTransactionsV2MarketUserTransactionsStartSizeGet, c as updateMarketConfigV2MarketConfigPost, d as userRetryInfoV2MarketRetryListingInfoGet, g as withdrawV2MarketWithdrawPost };
84
108
 
85
109
  //# sourceMappingURL=listing-backend.js.map