@coinbase-sample/prime-sdk-ts 0.8.2 → 0.10.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 (213) hide show
  1. package/dist/advancedTransfers/index.js +103 -0
  2. package/dist/advancedTransfers/types.js +2 -0
  3. package/dist/clients/clientWithServices.js +14 -0
  4. package/dist/constants.js +1 -1
  5. package/dist/financing/index.js +73 -0
  6. package/dist/futures/index.js +12 -0
  7. package/dist/index.js +3 -1
  8. package/dist/model/{CreateAddressGroup.js → ActiveLiquidationSummary.js} +1 -1
  9. package/dist/model/{DateOfBirth.js → AdvancedTransfer.js} +1 -1
  10. package/dist/model/{GetWalletAddressesResponse.js → BetaCrossMarginPrimeDerivativesEquityBreakdown.js} +1 -1
  11. package/dist/model/{StakingInputs.js → BetaCrossMarginPrimeMarginSummary.js} +1 -1
  12. package/dist/model/BetaCrossMarginPrimeRiskNettingInfo.js +21 -0
  13. package/dist/model/BetaCrossMarginPrimeSpotEquityBreakdown.js +21 -0
  14. package/dist/model/BetaCrossMarginPrimeXMPosition.js +21 -0
  15. package/dist/model/BetaCrossMarginRiskParameters.js +21 -0
  16. package/dist/model/BetaGetCrossMarginPrimeOverviewResponse.js +21 -0
  17. package/dist/model/BetaGetCrossMarginRiskParametersResponse.js +21 -0
  18. package/dist/model/BetaGetMarketDataResponse.js +21 -0
  19. package/dist/model/BetaMarketData.js +21 -0
  20. package/dist/model/BetaPrimeXMMarginCallThresholds.js +21 -0
  21. package/dist/model/BetaPrimeXMMarginRequirementBreakdown.js +21 -0
  22. package/dist/model/BetaPrimeXMMarginThreshold.js +21 -0
  23. package/dist/model/BetaPrimeXMOffsetCreditBreakdown.js +21 -0
  24. package/dist/model/BetaSetFundingSettingsResponse.js +21 -0
  25. package/dist/model/BetaTierPairRateEntry.js +21 -0
  26. package/dist/model/BlindMatchMetadata.js +21 -0
  27. package/dist/model/CancelAdvancedTransferResponse.js +21 -0
  28. package/dist/model/CommissionDetailTotal.js +21 -0
  29. package/dist/model/CreateAdvancedTransferRequest.js +21 -0
  30. package/dist/model/CreateAdvancedTransferResponse.js +21 -0
  31. package/dist/model/CrossMarginPrimeDerivativesEquityBreakdown.js +21 -0
  32. package/dist/model/CrossMarginPrimeMarginSummary.js +21 -0
  33. package/dist/model/CrossMarginPrimeRiskNettingInfo.js +21 -0
  34. package/dist/model/CrossMarginPrimeSpotEquityBreakdown.js +21 -0
  35. package/dist/model/CrossMarginPrimeXMPosition.js +21 -0
  36. package/dist/model/CrossMarginRiskParameters.js +21 -0
  37. package/dist/model/FcmScheduledMaintenance.js +21 -0
  38. package/dist/model/FcmTradingSessionDetails.js +21 -0
  39. package/dist/model/FundMovement.js +21 -0
  40. package/dist/model/FutureProductDetails.js +21 -0
  41. package/dist/model/GetCrossMarginPrimeOverviewResponse.js +21 -0
  42. package/dist/model/GetCrossMarginRiskParametersResponse.js +21 -0
  43. package/dist/model/GetFcmEquityResponse.js +21 -0
  44. package/dist/model/GetMarketDataResponse.js +21 -0
  45. package/dist/model/GetTransactionTravelRuleDataResponse.js +21 -0
  46. package/dist/model/ListAdvancedTransferTransactionsResponse.js +21 -0
  47. package/dist/model/ListAdvancedTransfersResponse.js +21 -0
  48. package/dist/model/MarketData.js +21 -0
  49. package/dist/model/PerpetualProductDetails.js +21 -0
  50. package/dist/model/PrimeXMMarginCallThresholds.js +21 -0
  51. package/dist/model/PrimeXMMarginRequirementBreakdown.js +21 -0
  52. package/dist/model/PrimeXMMarginThreshold.js +21 -0
  53. package/dist/model/PrimeXMOffsetCreditBreakdown.js +21 -0
  54. package/dist/model/SetFundingSettingsRequest.js +21 -0
  55. package/dist/model/SetFundingSettingsResponse.js +21 -0
  56. package/dist/model/TierPairRateEntry.js +21 -0
  57. package/dist/model/ValidatorAllocation.js +21 -0
  58. package/dist/model/ValidatorUnstakePreview.js +21 -0
  59. package/dist/model/enums/AdvancedTransferState.js +34 -0
  60. package/dist/model/enums/AdvancedTransferType.js +29 -0
  61. package/dist/model/enums/BetaPrimeXMControlStatus.js +32 -0
  62. package/dist/model/enums/BetaPrimeXMHealthStatus.js +36 -0
  63. package/dist/model/enums/BetaPrimeXMMarginLevel.js +34 -0
  64. package/dist/model/enums/BetaPrimeXMMarginRequirementType.js +31 -0
  65. package/dist/model/enums/BetaPrimeXMMarginThresholdType.js +32 -0
  66. package/dist/model/enums/ContractExpiryType.js +31 -0
  67. package/dist/model/enums/ExpiringContractStatus.js +31 -0
  68. package/dist/model/enums/FcmMarginHealthState.js +33 -0
  69. package/dist/model/enums/FcmTradingSessionClosedReason.js +32 -0
  70. package/dist/model/enums/FcmTradingSessionState.js +34 -0
  71. package/dist/model/enums/PrimeXMControlStatus.js +32 -0
  72. package/dist/model/enums/PrimeXMHealthStatus.js +36 -0
  73. package/dist/model/enums/PrimeXMMarginLevel.js +34 -0
  74. package/dist/model/enums/PrimeXMMarginRequirementType.js +31 -0
  75. package/dist/model/enums/PrimeXMMarginThresholdType.js +32 -0
  76. package/dist/model/enums/ProductType.js +30 -0
  77. package/dist/model/enums/RewardSubtype.js +2 -1
  78. package/dist/model/enums/RiskManagementType.js +31 -0
  79. package/dist/model/enums/SecondaryPermission.js +31 -0
  80. package/dist/model/enums/UserRole.js +2 -1
  81. package/dist/model/enums/XMLiquidationStatus.js +34 -0
  82. package/dist/model/enums/index.js +34 -2
  83. package/dist/model/primeBetaSetFundingSettingsRequest.js +21 -0
  84. package/dist/services.js +3 -1
  85. package/dist/shared/paginatedResponse.js +2 -0
  86. package/dist/transactions/index.js +13 -0
  87. package/dist/types/advancedTransfers/index.d.ts +31 -0
  88. package/dist/types/advancedTransfers/types.d.ts +46 -0
  89. package/dist/types/clients/clientWithServices.d.ts +10 -0
  90. package/dist/types/clients/clientWithServicesTypes.d.ts +5 -0
  91. package/dist/types/constants.d.ts +1 -1
  92. package/dist/types/financing/index.d.ts +9 -1
  93. package/dist/types/financing/types.d.ts +26 -1
  94. package/dist/types/futures/index.d.ts +4 -2
  95. package/dist/types/futures/types.d.ts +5 -1
  96. package/dist/types/index.d.ts +3 -1
  97. package/dist/types/model/ActiveLiquidationSummary.d.ts +31 -0
  98. package/dist/types/model/{TravelRuleEntry.d.ts → AdvancedTransfer.d.ts} +11 -16
  99. package/dist/types/model/BetaCrossMarginPrimeDerivativesEquityBreakdown.d.ts +40 -0
  100. package/dist/types/model/BetaCrossMarginPrimeMarginSummary.d.ts +100 -0
  101. package/dist/types/model/BetaCrossMarginPrimeRiskNettingInfo.d.ts +51 -0
  102. package/dist/types/model/BetaCrossMarginPrimeSpotEquityBreakdown.d.ts +44 -0
  103. package/dist/types/model/BetaCrossMarginPrimeXMPosition.d.ts +84 -0
  104. package/dist/types/model/BetaCrossMarginRiskParameters.d.ts +72 -0
  105. package/dist/types/model/BetaGetCrossMarginPrimeOverviewResponse.d.ts +31 -0
  106. package/dist/types/model/BetaGetCrossMarginRiskParametersResponse.d.ts +43 -0
  107. package/dist/types/model/BetaGetMarketDataResponse.d.ts +28 -0
  108. package/dist/types/model/BetaMarketData.d.ts +45 -0
  109. package/dist/types/model/BetaPrimeXMMarginCallThresholds.d.ts +42 -0
  110. package/dist/types/model/BetaPrimeXMMarginRequirementBreakdown.d.ts +41 -0
  111. package/dist/types/model/BetaPrimeXMMarginThreshold.d.ts +26 -0
  112. package/dist/types/model/BetaPrimeXMOffsetCreditBreakdown.d.ts +45 -0
  113. package/dist/types/model/BetaSetFundingSettingsResponse.d.ts +36 -0
  114. package/dist/types/model/BetaTierPairRateEntry.d.ts +36 -0
  115. package/dist/types/model/BlindMatchMetadata.d.ts +37 -0
  116. package/dist/types/model/CancelAdvancedTransferResponse.d.ts +28 -0
  117. package/dist/types/model/CommissionDetailTotal.d.ts +40 -0
  118. package/dist/types/model/{CreateAddressGroup.d.ts → CreateAdvancedTransferRequest.d.ts} +7 -7
  119. package/dist/types/model/{DateOfBirth.d.ts → CreateAdvancedTransferResponse.d.ts} +7 -5
  120. package/dist/types/model/CrossMarginOverview.d.ts +2 -0
  121. package/dist/types/model/CrossMarginPrimeDerivativesEquityBreakdown.d.ts +40 -0
  122. package/dist/types/model/CrossMarginPrimeMarginSummary.d.ts +100 -0
  123. package/dist/types/model/CrossMarginPrimeRiskNettingInfo.d.ts +51 -0
  124. package/dist/types/model/CrossMarginPrimeSpotEquityBreakdown.d.ts +44 -0
  125. package/dist/types/model/CrossMarginPrimeXMPosition.d.ts +84 -0
  126. package/dist/types/model/CrossMarginRiskParameters.d.ts +72 -0
  127. package/dist/types/model/EntityUser.d.ts +9 -0
  128. package/dist/types/model/{StakingInputs.d.ts → FcmScheduledMaintenance.d.ts} +8 -4
  129. package/dist/types/model/FcmTradingSessionDetails.d.ts +51 -0
  130. package/dist/types/model/Fill.d.ts +4 -0
  131. package/dist/types/model/FundMovement.d.ts +30 -0
  132. package/dist/types/model/FutureProductDetails.d.ts +59 -0
  133. package/dist/types/model/GetCrossMarginPrimeOverviewResponse.d.ts +31 -0
  134. package/dist/types/model/GetCrossMarginRiskParametersResponse.d.ts +43 -0
  135. package/dist/types/model/GetFcmEquityResponse.d.ts +37 -0
  136. package/dist/types/model/GetFcmRiskLimitsResponse.d.ts +6 -0
  137. package/dist/types/model/{GetWalletAddressesResponse.d.ts → GetMarketDataResponse.d.ts} +8 -5
  138. package/dist/types/model/GetTransactionTravelRuleDataResponse.d.ts +31 -0
  139. package/dist/types/model/ListAdvancedTransferTransactionsResponse.d.ts +29 -0
  140. package/dist/types/model/ListAdvancedTransfersResponse.d.ts +28 -0
  141. package/dist/types/model/MarketData.d.ts +45 -0
  142. package/dist/types/model/NetworkDetails.d.ts +12 -0
  143. package/dist/types/model/Order.d.ts +4 -0
  144. package/dist/types/model/PerpetualProductDetails.d.ts +41 -0
  145. package/dist/types/model/PortfolioUser.d.ts +9 -0
  146. package/dist/types/model/PreviewUnstakeResponse.d.ts +17 -0
  147. package/dist/types/model/PrimeXMMarginCallThresholds.d.ts +42 -0
  148. package/dist/types/model/PrimeXMMarginRequirementBreakdown.d.ts +41 -0
  149. package/dist/types/model/PrimeXMMarginThreshold.d.ts +26 -0
  150. package/dist/types/model/PrimeXMOffsetCreditBreakdown.d.ts +45 -0
  151. package/dist/types/model/Product.d.ts +6 -0
  152. package/dist/types/model/QuoteResponse.d.ts +4 -0
  153. package/dist/types/model/RFQ.d.ts +4 -0
  154. package/dist/types/model/SetFundingSettingsRequest.d.ts +44 -0
  155. package/dist/types/model/SetFundingSettingsResponse.d.ts +36 -0
  156. package/dist/types/model/TierPairRateEntry.d.ts +36 -0
  157. package/dist/types/model/ValidatorAllocation.d.ts +32 -0
  158. package/dist/types/model/ValidatorUnstakePreview.d.ts +40 -0
  159. package/dist/types/model/WalletUnstakeInputs.d.ts +5 -0
  160. package/dist/types/model/XMRiskNettingInfo.d.ts +2 -2
  161. package/dist/types/model/enums/AdvancedTransferState.d.ts +30 -0
  162. package/dist/types/model/enums/AdvancedTransferType.d.ts +25 -0
  163. package/dist/types/model/enums/BetaPrimeXMControlStatus.d.ts +28 -0
  164. package/dist/types/model/enums/BetaPrimeXMHealthStatus.d.ts +32 -0
  165. package/dist/types/model/enums/BetaPrimeXMMarginLevel.d.ts +30 -0
  166. package/dist/types/model/enums/BetaPrimeXMMarginRequirementType.d.ts +27 -0
  167. package/dist/types/model/enums/BetaPrimeXMMarginThresholdType.d.ts +28 -0
  168. package/dist/types/model/enums/ContractExpiryType.d.ts +27 -0
  169. package/dist/types/model/enums/ExpiringContractStatus.d.ts +27 -0
  170. package/dist/types/model/enums/FcmMarginHealthState.d.ts +29 -0
  171. package/dist/types/model/enums/FcmTradingSessionClosedReason.d.ts +28 -0
  172. package/dist/types/model/enums/FcmTradingSessionState.d.ts +30 -0
  173. package/dist/types/model/enums/PrimeXMControlStatus.d.ts +28 -0
  174. package/dist/types/model/enums/PrimeXMHealthStatus.d.ts +32 -0
  175. package/dist/types/model/enums/PrimeXMMarginLevel.d.ts +30 -0
  176. package/dist/types/model/enums/PrimeXMMarginRequirementType.d.ts +27 -0
  177. package/dist/types/model/enums/PrimeXMMarginThresholdType.d.ts +28 -0
  178. package/dist/types/model/{VASP.d.ts → enums/ProductType.d.ts} +6 -7
  179. package/dist/types/model/enums/RewardSubtype.d.ts +3 -2
  180. package/dist/types/model/enums/RiskManagementType.d.ts +27 -0
  181. package/dist/types/model/{TravelRuleWalletDetails.d.ts → enums/SecondaryPermission.d.ts} +7 -8
  182. package/dist/types/model/enums/UserRole.d.ts +3 -2
  183. package/dist/types/model/enums/XMLiquidationStatus.d.ts +30 -0
  184. package/dist/types/model/enums/index.d.ts +16 -0
  185. package/dist/types/model/googleTypeDate.d.ts +1 -1
  186. package/dist/types/model/index.d.ts +35 -4
  187. package/dist/types/model/primeBetaSetFundingSettingsRequest.d.ts +44 -0
  188. package/dist/types/services.d.ts +1 -0
  189. package/dist/types/shared/paginatedResponse.d.ts +6 -0
  190. package/dist/types/transactions/index.d.ts +3 -1
  191. package/dist/types/transactions/types.d.ts +6 -1
  192. package/package.json +2 -2
  193. package/dist/model/TravelRuleEntry.js +0 -21
  194. package/dist/model/TravelRuleWalletDetails.js +0 -21
  195. package/dist/model/VASP.js +0 -21
  196. package/dist/model/enumPrefixes.js +0 -330
  197. package/dist/shared/dynamicEnumValidation.js +0 -184
  198. package/dist/shared/dynamicEnumValidation.old.js +0 -746
  199. package/dist/shared/enumHelpers.js +0 -219
  200. package/dist/shared/enumRegistry.js +0 -153
  201. package/dist/shared/enumValidationCore.js +0 -194
  202. package/dist/shared/enumValidators.js +0 -115
  203. package/dist/shared/fieldMapping.js +0 -242
  204. package/dist/shared/serviceContext.js +0 -157
  205. package/dist/types/model/enumPrefixes.d.ts +0 -206
  206. package/dist/types/shared/dynamicEnumValidation.d.ts +0 -48
  207. package/dist/types/shared/dynamicEnumValidation.old.d.ts +0 -143
  208. package/dist/types/shared/enumHelpers.d.ts +0 -135
  209. package/dist/types/shared/enumRegistry.d.ts +0 -74
  210. package/dist/types/shared/enumValidationCore.d.ts +0 -68
  211. package/dist/types/shared/enumValidators.d.ts +0 -117
  212. package/dist/types/shared/fieldMapping.d.ts +0 -35
  213. package/dist/types/shared/serviceContext.d.ts +0 -46
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.AdvancedTransfersService = void 0;
24
+ /**
25
+ * Copyright 2026-present Coinbase Global, Inc.
26
+ *
27
+ * Licensed under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License.
29
+ * You may obtain a copy of the License at
30
+ *
31
+ * http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software
34
+ * distributed under the License is distributed on an "AS IS" BASIS,
35
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+ * See the License for the specific language governing permissions and
37
+ * limitations under the License.
38
+ */
39
+ const clients_1 = require("../clients");
40
+ const paginatedResponse_1 = require("../shared/paginatedResponse");
41
+ const validation_1 = require("../shared/validation");
42
+ class AdvancedTransfersService {
43
+ constructor(client) {
44
+ this.client = client;
45
+ }
46
+ listAdvancedTransfers(request, options) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ (0, validation_1.validate)(request).requiredUUID((r) => r.portfolioId).check();
49
+ const paginationParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
50
+ const { limit, cursor, sortDirection, portfolioId } = request, queryParams = __rest(request, ["limit", "cursor", "sortDirection", "portfolioId"]);
51
+ const finalQueryParams = Object.assign(Object.assign({}, paginationParams), queryParams);
52
+ const response = yield this.client.request({
53
+ url: `portfolios/${portfolioId}/advanced_transfers`,
54
+ queryParams: finalQueryParams,
55
+ callOptions: options,
56
+ });
57
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
58
+ return (0, paginatedResponse_1.createPaginatedResponse)(response.data, this.listAdvancedTransfers.bind(this), request, paginatedResponse_1.ResponseExtractors.advancedTransfers, paginationOptions);
59
+ });
60
+ }
61
+ createAdvancedTransfer(request, options) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ (0, validation_1.validate)(request).requiredUUID((r) => r.portfolioId).check();
64
+ const { portfolioId, advancedTransfer } = request;
65
+ const response = yield this.client.request({
66
+ url: `portfolios/${portfolioId}/advanced_transfers`,
67
+ bodyParams: { advancedTransfer },
68
+ method: clients_1.Method.POST,
69
+ callOptions: options,
70
+ });
71
+ return response.data;
72
+ });
73
+ }
74
+ cancelAdvancedTransfer(request, options) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ (0, validation_1.validate)(request)
77
+ .requiredUUID((r) => r.portfolioId)
78
+ .requiredUUID((r) => r.advancedTransferId)
79
+ .check();
80
+ const response = yield this.client.request({
81
+ url: `portfolios/${request.portfolioId}/advanced_transfers/${request.advancedTransferId}/cancel`,
82
+ bodyParams: {},
83
+ method: clients_1.Method.POST,
84
+ callOptions: options,
85
+ });
86
+ return response.data;
87
+ });
88
+ }
89
+ listAdvancedTransferTransactions(request, options) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ (0, validation_1.validate)(request)
92
+ .requiredUUID((r) => r.portfolioId)
93
+ .requiredUUID((r) => r.advancedTransferId)
94
+ .check();
95
+ const response = yield this.client.request({
96
+ url: `portfolios/${request.portfolioId}/advanced_transfers/${request.advancedTransferId}/transactions`,
97
+ callOptions: options,
98
+ });
99
+ return response.data;
100
+ });
101
+ }
102
+ }
103
+ exports.AdvancedTransfersService = AdvancedTransfersService;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -47,6 +47,20 @@ class CoinbasePrimeClientWithServices extends core_ts_1.CoinbaseClient {
47
47
  const credentials = (0, envUtils_1.createCredentialsFromEnv)();
48
48
  return new CoinbasePrimeClientWithServices(credentials, baseUrl, options);
49
49
  }
50
+ /**
51
+ * Lazy getter for AdvancedTransfersService
52
+ * @example
53
+ * ```typescript
54
+ * const transfers = await client.advancedTransfers.listAdvancedTransfers({ portfolioId });
55
+ * ```
56
+ */
57
+ get advancedTransfers() {
58
+ if (!this._advancedTransfersService) {
59
+ const { AdvancedTransfersService } = require('../advancedTransfers');
60
+ this._advancedTransfersService = new AdvancedTransfersService(this);
61
+ }
62
+ return this._advancedTransfersService;
63
+ }
50
64
  /**
51
65
  * Lazy getter for ActivitiesService
52
66
  * @example
package/dist/constants.js CHANGED
@@ -16,7 +16,7 @@ exports.DEFAULT_MAX_ITEMS = exports.DEFAULT_MAX_PAGES = exports.DEFAULT_PAGINATI
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- exports.VERSION = '0.8.2';
19
+ exports.VERSION = '0.10.0';
20
20
  exports.API_BASE_PATH = 'https://api.prime.coinbase.com/v1/';
21
21
  exports.USER_AGENT = 'coinbase-prime-ts/' + exports.VERSION;
22
22
  exports.CB_ACCESS_KEY_HEADER = 'X-CB-ACCESS-KEY';
@@ -21,7 +21,24 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.FinancingService = void 0;
24
+ /**
25
+ * Copyright 2025-present Coinbase Global, Inc.
26
+ *
27
+ * Licensed under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License.
29
+ * You may obtain a copy of the License at
30
+ *
31
+ * http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software
34
+ * distributed under the License is distributed on an "AS IS" BASIS,
35
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+ * See the License for the specific language governing permissions and
37
+ * limitations under the License.
38
+ */
39
+ const clients_1 = require("../clients");
24
40
  const validation_1 = require("../shared/validation");
41
+ const paginatedResponse_1 = require("../shared/paginatedResponse");
25
42
  class FinancingService {
26
43
  constructor(client) {
27
44
  this.client = client;
@@ -250,5 +267,61 @@ class FinancingService {
250
267
  return response.data;
251
268
  });
252
269
  }
270
+ getCrossMarginRiskParameters(request, options) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ (0, validation_1.validate)(request).requiredUUID((r) => r.entityId).check();
273
+ const response = yield this.client.request({
274
+ url: `entities/${request.entityId}/cross_margin/risk_parameters`,
275
+ callOptions: options,
276
+ });
277
+ return response.data;
278
+ });
279
+ }
280
+ getCrossMarginPrimeOverview(request, options) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ (0, validation_1.validate)(request).requiredUUID((r) => r.entityId).check();
283
+ // This endpoint is on the v2 API path; use a relative URL that resolves
284
+ // correctly against the v1 base URL for both auth signing and HTTP dispatch.
285
+ const response = yield this.client.request({
286
+ url: `../v2/entities/${request.entityId}/cross_margin/prime`,
287
+ callOptions: options,
288
+ });
289
+ return response.data;
290
+ });
291
+ }
292
+ setFundingSettings(request, options) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ (0, validation_1.validate)(request).requiredUUID((r) => r.entityId).check();
295
+ const { entityId, designatedFundingPortfolioId, automaticConversionEnabled, automaticLoanEnabled, automaticExcessReturnEnabled, excessFundsTargetAmount, } = request;
296
+ const response = yield this.client.request({
297
+ url: `entities/${entityId}/funding_settings`,
298
+ bodyParams: {
299
+ designatedFundingPortfolioId,
300
+ automaticConversionEnabled,
301
+ automaticLoanEnabled,
302
+ automaticExcessReturnEnabled,
303
+ excessFundsTargetAmount,
304
+ },
305
+ method: clients_1.Method.POST,
306
+ callOptions: options,
307
+ });
308
+ return response.data;
309
+ });
310
+ }
311
+ listMarketData(request, options) {
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ (0, validation_1.validate)(request).requiredUUID((r) => r.entityId).check();
314
+ const paginationParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
315
+ const { limit, cursor, sortDirection, entityId } = request, queryParams = __rest(request, ["limit", "cursor", "sortDirection", "entityId"]);
316
+ const finalQueryParams = Object.assign(Object.assign({}, paginationParams), queryParams);
317
+ const response = yield this.client.request({
318
+ url: `entities/${entityId}/market_data`,
319
+ queryParams: finalQueryParams,
320
+ callOptions: options,
321
+ });
322
+ const paginationOptions = (0, paginatedResponse_1.getDefaultPaginationOptions)(this.client, options);
323
+ return (0, paginatedResponse_1.createPaginatedResponse)(response.data, this.listMarketData.bind(this), request, paginatedResponse_1.ResponseExtractors.marketData, paginationOptions);
324
+ });
325
+ }
253
326
  }
254
327
  exports.FinancingService = FinancingService;
@@ -162,5 +162,17 @@ class FuturesService {
162
162
  return response.data;
163
163
  });
164
164
  }
165
+ getEntityEquity(request, options) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ (0, validation_1.validate)(request)
168
+ .requiredUUID((r) => r.entityId)
169
+ .check();
170
+ const response = yield this.client.request({
171
+ url: `entities/${request.entityId}/futures/equity`,
172
+ callOptions: options,
173
+ });
174
+ return response.data;
175
+ });
176
+ }
165
177
  }
166
178
  exports.FuturesService = FuturesService;
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.WalletsService = exports.UsersService = exports.TransactionsService = exports.StakingService = exports.ProductsService = exports.PositionsService = exports.PortfoliosService = exports.PaymentMethodsService = exports.OrdersService = exports.OnchainAddressBookService = exports.InvoicesService = exports.FuturesService = exports.FinancingService = exports.CommissionService = exports.BalancesService = exports.AssetsService = exports.AllocationService = exports.AddressBooksService = exports.ActivitiesService = exports.isValidUUID = exports.validate = exports.CoinbasePrimeException = exports.CoinbasePrimeClientException = exports.createCredentialsFromEnv = exports.CoinbasePrimeCredentials = exports.CoinbasePrimeClient = exports.CoinbasePrimeClientWithServices = exports.CoinbaseError = exports.CoinbaseClientException = exports.Method = exports.CoinbaseClient = void 0;
32
+ exports.WalletsService = exports.UsersService = exports.TransactionsService = exports.StakingService = exports.ProductsService = exports.PositionsService = exports.PortfoliosService = exports.PaymentMethodsService = exports.OrdersService = exports.OnchainAddressBookService = exports.InvoicesService = exports.FuturesService = exports.FinancingService = exports.CommissionService = exports.BalancesService = exports.AssetsService = exports.AllocationService = exports.AddressBooksService = exports.ActivitiesService = exports.AdvancedTransfersService = exports.isValidUUID = exports.validate = exports.CoinbasePrimeException = exports.CoinbasePrimeClientException = exports.createCredentialsFromEnv = exports.CoinbasePrimeCredentials = exports.CoinbasePrimeClient = exports.CoinbasePrimeClientWithServices = exports.CoinbaseError = exports.CoinbaseClientException = exports.Method = exports.CoinbaseClient = void 0;
33
33
  // Re-export commonly used core-ts objects for convenience
34
34
  // This allows users to import everything from a single package
35
35
  var clients_1 = require("./clients");
@@ -49,6 +49,8 @@ Object.defineProperty(exports, "CoinbasePrimeException", { enumerable: true, get
49
49
  var validation_1 = require("./shared/validation");
50
50
  Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validation_1.validate; } });
51
51
  Object.defineProperty(exports, "isValidUUID", { enumerable: true, get: function () { return validation_1.isValidUUID; } });
52
+ var advancedTransfers_1 = require("./advancedTransfers");
53
+ Object.defineProperty(exports, "AdvancedTransfersService", { enumerable: true, get: function () { return advancedTransfers_1.AdvancedTransfersService; } });
52
54
  var activities_1 = require("./activities");
53
55
  Object.defineProperty(exports, "ActivitiesService", { enumerable: true, get: function () { return activities_1.ActivitiesService; } });
54
56
  var addressBooks_1 = require("./addressBooks");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2025-present Coinbase Global, Inc.
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
4
  *
5
5
  * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
6
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2025-present Coinbase Global, Inc.
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
4
  *
5
5
  * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
6
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2025-present Coinbase Global, Inc.
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
4
  *
5
5
  * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
6
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2025-present Coinbase Global, Inc.
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
4
  *
5
5
  * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
6
  *
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2026-present Coinbase Global, Inc.
4
+ *
5
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ * Do not edit the class manually.
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });