@coinbase-sample/prime-sdk-ts 0.7.1 → 0.8.1

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 (114) hide show
  1. package/dist/activities/index.js +14 -0
  2. package/dist/addressBooks/index.js +10 -0
  3. package/dist/allocations/index.js +12 -0
  4. package/dist/assets/index.js +4 -0
  5. package/dist/balances/index.js +15 -0
  6. package/dist/commission/index.js +4 -0
  7. package/dist/constants.js +1 -1
  8. package/dist/financing/index.js +70 -0
  9. package/dist/futures/index.js +53 -0
  10. package/dist/index.js +7 -1
  11. package/dist/invoices/index.js +4 -0
  12. package/dist/model/DateOfBirth.js +21 -0
  13. package/dist/model/DetailedAddress.js +21 -0
  14. package/dist/model/GetFcmSettingsResponse.js +21 -0
  15. package/dist/model/GetUnstakingStatusResponse.js +21 -0
  16. package/dist/model/ListFinancingEligibleAssetsResponse.js +21 -0
  17. package/dist/model/ListTFObligationsResponse.js +21 -0
  18. package/dist/model/NaturalPersonName.js +21 -0
  19. package/dist/model/PreviewUnstakeRequest.js +21 -0
  20. package/dist/model/PreviewUnstakeResponse.js +21 -0
  21. package/dist/model/ProcessRequirements.js +21 -0
  22. package/dist/model/RewardMetadata.js +21 -0
  23. package/dist/model/SetFcmSettingsRequest.js +21 -0
  24. package/dist/model/SetFcmSettingsResponse.js +21 -0
  25. package/dist/model/TFAsset.js +21 -0
  26. package/dist/model/TFObligation.js +21 -0
  27. package/dist/model/TravelRuleEntry.js +21 -0
  28. package/dist/model/TravelRuleParty.js +21 -0
  29. package/dist/model/TravelRuleWalletDetails.js +21 -0
  30. package/dist/model/UnstakingStatus.js +21 -0
  31. package/dist/model/VASP.js +21 -0
  32. package/dist/model/ValidatorUnstakingInfo.js +21 -0
  33. package/dist/model/enums/CandlesGranularity.js +3 -3
  34. package/dist/model/enums/EstimateType.js +28 -0
  35. package/dist/model/enums/OrderType.js +2 -1
  36. package/dist/model/enums/PegOffsetType.js +31 -0
  37. package/dist/model/enums/RewardSubtype.js +34 -0
  38. package/dist/model/enums/TransactionType.js +3 -1
  39. package/dist/model/enums/TravelRuleStatus.js +28 -0
  40. package/dist/model/enums/TravelRuleWalletType.js +31 -0
  41. package/dist/model/enums/UnstakeType.js +28 -0
  42. package/dist/model/enums/UserRole.js +2 -1
  43. package/dist/model/enums/XMCallType.js +2 -1
  44. package/dist/model/enums/XMEntityCallStatus.js +2 -1
  45. package/dist/model/enums/index.js +14 -2
  46. package/dist/onchainAddressBook/index.js +14 -0
  47. package/dist/orders/index.js +59 -0
  48. package/dist/paymentMethods/index.js +8 -0
  49. package/dist/portfolios/index.js +10 -0
  50. package/dist/positions/index.js +7 -0
  51. package/dist/products/index.js +11 -0
  52. package/dist/shared/__tests__/validation.test.js +270 -0
  53. package/dist/shared/validation.js +210 -0
  54. package/dist/staking/index.js +63 -0
  55. package/dist/transactions/index.js +42 -0
  56. package/dist/types/activities/types.d.ts +1 -0
  57. package/dist/types/constants.d.ts +1 -1
  58. package/dist/types/financing/index.d.ts +5 -1
  59. package/dist/types/financing/types.d.ts +7 -1
  60. package/dist/types/futures/index.d.ts +6 -2
  61. package/dist/types/futures/types.d.ts +10 -1
  62. package/dist/types/index.d.ts +3 -0
  63. package/dist/types/model/CreateOrderRequest.d.ts +8 -1
  64. package/dist/types/model/CreatePortfolioAddressBookEntryRequest.d.ts +6 -0
  65. package/dist/types/model/DateOfBirth.d.ts +24 -0
  66. package/dist/types/model/DetailedAddress.d.ts +28 -0
  67. package/dist/types/model/GetFcmSettingsResponse.d.ts +25 -0
  68. package/dist/types/model/GetUnstakingStatusResponse.d.ts +42 -0
  69. package/dist/types/model/ListFinancingEligibleAssetsResponse.d.ts +26 -0
  70. package/dist/types/model/ListTFObligationsResponse.d.ts +26 -0
  71. package/dist/types/model/NaturalPersonName.d.ts +24 -0
  72. package/dist/types/model/NetworkDetails.d.ts +4 -0
  73. package/dist/types/model/Order.d.ts +12 -0
  74. package/dist/types/model/OrderPreviewRequest.d.ts +7 -0
  75. package/dist/types/model/PreviewUnstakeRequest.d.ts +28 -0
  76. package/dist/types/model/PreviewUnstakeResponse.d.ts +28 -0
  77. package/dist/types/model/ProcessRequirements.d.ts +23 -0
  78. package/dist/types/model/RewardMetadata.d.ts +23 -0
  79. package/dist/types/model/SetFcmSettingsRequest.d.ts +25 -0
  80. package/dist/types/model/SetFcmSettingsResponse.d.ts +25 -0
  81. package/dist/types/model/TFAsset.d.ts +33 -0
  82. package/dist/types/model/TFObligation.d.ts +41 -0
  83. package/dist/types/model/Transaction.d.ts +2 -0
  84. package/dist/types/model/TransactionMetadata.d.ts +2 -0
  85. package/dist/types/model/TravelRuleEntry.d.ts +38 -0
  86. package/dist/types/model/TravelRuleParty.d.ts +32 -0
  87. package/dist/types/model/TravelRuleWalletDetails.d.ts +28 -0
  88. package/dist/types/model/UnstakingStatus.d.ts +45 -0
  89. package/dist/types/model/VASP.d.ts +27 -0
  90. package/dist/types/model/ValidatorUnstakingInfo.d.ts +30 -0
  91. package/dist/types/model/enums/CandlesGranularity.d.ts +3 -3
  92. package/dist/types/model/enums/EstimateType.d.ts +24 -0
  93. package/dist/types/model/enums/OrderType.d.ts +3 -2
  94. package/dist/types/model/enums/PegOffsetType.d.ts +27 -0
  95. package/dist/types/model/enums/RewardSubtype.d.ts +30 -0
  96. package/dist/types/model/enums/TransactionType.d.ts +4 -2
  97. package/dist/types/model/enums/TravelRuleStatus.d.ts +24 -0
  98. package/dist/types/model/enums/TravelRuleWalletType.d.ts +27 -0
  99. package/dist/types/model/enums/UnstakeType.d.ts +24 -0
  100. package/dist/types/model/enums/UserRole.d.ts +3 -2
  101. package/dist/types/model/enums/XMCallType.d.ts +3 -2
  102. package/dist/types/model/enums/XMEntityCallStatus.d.ts +3 -2
  103. package/dist/types/model/enums/index.d.ts +6 -0
  104. package/dist/types/model/index.d.ts +21 -0
  105. package/dist/types/orders/types.d.ts +1 -1
  106. package/dist/types/shared/__tests__/validation.test.d.ts +1 -0
  107. package/dist/types/shared/validation.d.ts +88 -0
  108. package/dist/types/staking/index.d.ts +5 -1
  109. package/dist/types/staking/types.d.ts +12 -1
  110. package/dist/types/transactions/types.d.ts +3 -1
  111. package/dist/types/wallets/types.d.ts +2 -1
  112. package/dist/users/index.js +7 -0
  113. package/dist/wallets/index.js +27 -0
  114. package/package.json +13 -9
@@ -38,12 +38,17 @@ exports.TransactionsService = void 0;
38
38
  */
39
39
  const clients_1 = require("../clients");
40
40
  const paginatedResponse_1 = require("../shared/paginatedResponse");
41
+ const validation_1 = require("../shared/validation");
41
42
  class TransactionsService {
42
43
  constructor(client) {
43
44
  this.client = client;
44
45
  }
45
46
  getTransaction(request, options) {
46
47
  return __awaiter(this, void 0, void 0, function* () {
48
+ (0, validation_1.validate)(request)
49
+ .requiredUUID((r) => r.portfolioId)
50
+ .requiredUUID((r) => r.transactionId)
51
+ .check();
47
52
  const response = yield this.client.request({
48
53
  url: `portfolios/${request.portfolioId}/transactions/${request.transactionId}`,
49
54
  callOptions: options,
@@ -53,6 +58,9 @@ class TransactionsService {
53
58
  }
54
59
  listPortfolioTransactions(request, options) {
55
60
  return __awaiter(this, void 0, void 0, function* () {
61
+ (0, validation_1.validate)(request)
62
+ .requiredUUID((r) => r.portfolioId)
63
+ .check();
56
64
  const paginationParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
57
65
  const { limit, cursor, sortDirection, portfolioId } = request, queryParams = __rest(request, ["limit", "cursor", "sortDirection", "portfolioId"]);
58
66
  const finalQueryParams = Object.assign(Object.assign({}, paginationParams), queryParams);
@@ -70,6 +78,10 @@ class TransactionsService {
70
78
  }
71
79
  listWalletTransactions(request, options) {
72
80
  return __awaiter(this, void 0, void 0, function* () {
81
+ (0, validation_1.validate)(request)
82
+ .requiredUUID((r) => r.portfolioId)
83
+ .requiredUUID((r) => r.walletId)
84
+ .check();
73
85
  const paginationParams = (0, paginatedResponse_1.getQueryParams)(this.client, request);
74
86
  const { limit, cursor, sortDirection, portfolioId, walletId } = request, queryParams = __rest(request, ["limit", "cursor", "sortDirection", "portfolioId", "walletId"]);
75
87
  const finalQueryParams = Object.assign(Object.assign({}, paginationParams), queryParams);
@@ -87,6 +99,15 @@ class TransactionsService {
87
99
  }
88
100
  createConversion(request, options) {
89
101
  return __awaiter(this, void 0, void 0, function* () {
102
+ (0, validation_1.validate)(request)
103
+ .requiredUUID((r) => r.portfolioId)
104
+ .requiredUUID((r) => r.walletId)
105
+ .requiredUUID((r) => r.idempotencyKey)
106
+ .requiredUUID((r) => r.destination)
107
+ .requiredString((r) => r.amount)
108
+ .requiredString((r) => r.sourceSymbol)
109
+ .requiredString((r) => r.destinationSymbol)
110
+ .check();
90
111
  const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
91
112
  const response = yield this.client.request({
92
113
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/conversion`,
@@ -99,6 +120,14 @@ class TransactionsService {
99
120
  }
100
121
  createTransfer(request, options) {
101
122
  return __awaiter(this, void 0, void 0, function* () {
123
+ (0, validation_1.validate)(request)
124
+ .requiredUUID((r) => r.portfolioId)
125
+ .requiredUUID((r) => r.walletId)
126
+ .requiredUUID((r) => r.idempotencyKey)
127
+ .requiredUUID((r) => r.destination)
128
+ .requiredString((r) => r.amount)
129
+ .requiredString((r) => r.currencySymbol)
130
+ .check();
102
131
  const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
103
132
  const response = yield this.client.request({
104
133
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/transfers`,
@@ -111,6 +140,14 @@ class TransactionsService {
111
140
  }
112
141
  createWithdrawal(request, options) {
113
142
  return __awaiter(this, void 0, void 0, function* () {
143
+ (0, validation_1.validate)(request)
144
+ .requiredUUID((r) => r.portfolioId)
145
+ .requiredUUID((r) => r.walletId)
146
+ .requiredUUID((r) => r.idempotencyKey)
147
+ .requiredString((r) => r.amount)
148
+ .requiredString((r) => r.destinationType)
149
+ .requiredString((r) => r.currencySymbol)
150
+ .check();
114
151
  const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
115
152
  const response = yield this.client.request({
116
153
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/withdrawals`,
@@ -123,6 +160,11 @@ class TransactionsService {
123
160
  }
124
161
  createOnchainTransaction(request, options) {
125
162
  return __awaiter(this, void 0, void 0, function* () {
163
+ (0, validation_1.validate)(request)
164
+ .requiredUUID((r) => r.portfolioId)
165
+ .requiredUUID((r) => r.walletId)
166
+ .requiredString((r) => r.rawUnsignedTxn)
167
+ .check();
126
168
  const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
127
169
  const response = yield this.client.request({
128
170
  url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/onchain_transaction`,
@@ -24,6 +24,7 @@ export type ActivityFilters = Pagination & {
24
24
  statuses?: ActivityStatus[];
25
25
  startTime?: string;
26
26
  endTime?: string;
27
+ getNetworkUnifiedActivities?: boolean;
27
28
  };
28
29
  export type GetActivityRequest = {
29
30
  activityId: string;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const VERSION = "0.7.1";
16
+ export declare const VERSION = "0.8.1";
17
17
  export declare const API_BASE_PATH = "https://api.prime.coinbase.com/v1/";
18
18
  export declare const USER_AGENT: string;
19
19
  export declare const CB_ACCESS_KEY_HEADER = "X-CB-ACCESS-KEY";
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { IPrimeApiClient, CoinbaseCallOptions } from '../clients';
17
- import { ListExistingLocatesRequest, ListExistingLocatesResponse, ListInterestAccrualsRequest, ListInterestAccrualsResponse, ListPortfolioInterestAccrualsRequest, ListPortfolioInterestAccrualsResponse, ListMarginCallSummariesRequest, ListMarginCallSummariesResponse, ListMarginConversionsRequest, ListMarginConversionsResponse, GetEntityLocateAvailabilitiesRequest, GetEntityLocateAvailabilitiesResponse, GetMarginInformationRequest, GetMarginInformationResponse, GetPortfolioBuyingPowerRequest, GetPortfolioBuyingPowerResponse, GetPortfolioCreditInformationRequest, GetPortfolioCreditInformationResponse, GetPortfolioWithdrawalPowerRequest, GetPortfolioWithdrawalPowerResponse, GetTieredPricingFeesRequest, GetTieredPricingFeesResponse, GetFcmMarginCallDetailsRequest, GetFcmMarginCallDetailsResponse, GetFcmRiskLimitsRequest, GetFcmRiskLimitsResponse, CreateNewLocatesRequest, CreateNewLocatesResponse, GetCrossMarginOverviewRequest, GetCrossMarginOverviewResponse } from './types';
17
+ import { ListExistingLocatesRequest, ListExistingLocatesResponse, ListInterestAccrualsRequest, ListInterestAccrualsResponse, ListPortfolioInterestAccrualsRequest, ListPortfolioInterestAccrualsResponse, ListMarginCallSummariesRequest, ListMarginCallSummariesResponse, ListMarginConversionsRequest, ListMarginConversionsResponse, GetEntityLocateAvailabilitiesRequest, GetEntityLocateAvailabilitiesResponse, GetMarginInformationRequest, GetMarginInformationResponse, GetPortfolioBuyingPowerRequest, GetPortfolioBuyingPowerResponse, GetPortfolioCreditInformationRequest, GetPortfolioCreditInformationResponse, GetPortfolioWithdrawalPowerRequest, GetPortfolioWithdrawalPowerResponse, GetTieredPricingFeesRequest, GetTieredPricingFeesResponse, GetFcmMarginCallDetailsRequest, GetFcmMarginCallDetailsResponse, GetFcmRiskLimitsRequest, GetFcmRiskLimitsResponse, CreateNewLocatesRequest, CreateNewLocatesResponse, GetCrossMarginOverviewRequest, GetCrossMarginOverviewResponse, ListTFObligationsRequest, ListTFObligationsResponse, ListFinancingEligibleAssetsRequest, ListFinancingEligibleAssetsResponse } from './types';
18
18
  export interface IFinancingService {
19
19
  listExistingLocates(request: ListExistingLocatesRequest, options?: CoinbaseCallOptions): Promise<ListExistingLocatesResponse>;
20
20
  listInterestAccruals(request: ListInterestAccrualsRequest, options?: CoinbaseCallOptions): Promise<ListInterestAccrualsResponse>;
@@ -31,6 +31,8 @@ export interface IFinancingService {
31
31
  getFcmRiskLimits(request: GetFcmRiskLimitsRequest, options?: CoinbaseCallOptions): Promise<GetFcmRiskLimitsResponse>;
32
32
  createNewLocates(request: CreateNewLocatesRequest, options?: CoinbaseCallOptions): Promise<CreateNewLocatesResponse>;
33
33
  getCrossMarginOverview(request: GetCrossMarginOverviewRequest, options?: CoinbaseCallOptions): Promise<GetCrossMarginOverviewResponse>;
34
+ listTFObligations(request: ListTFObligationsRequest, options?: CoinbaseCallOptions): Promise<ListTFObligationsResponse>;
35
+ listFinancingEligibleAssets(request?: ListFinancingEligibleAssetsRequest, options?: CoinbaseCallOptions): Promise<ListFinancingEligibleAssetsResponse>;
34
36
  }
35
37
  export declare class FinancingService implements IFinancingService {
36
38
  private client;
@@ -50,4 +52,6 @@ export declare class FinancingService implements IFinancingService {
50
52
  getFcmRiskLimits(request: GetFcmRiskLimitsRequest, options?: CoinbaseCallOptions): Promise<GetFcmRiskLimitsResponse>;
51
53
  createNewLocates(request: CreateNewLocatesRequest, options?: CoinbaseCallOptions): Promise<CreateNewLocatesResponse>;
52
54
  getCrossMarginOverview(request: GetCrossMarginOverviewRequest, options?: CoinbaseCallOptions): Promise<GetCrossMarginOverviewResponse>;
55
+ listTFObligations(request: ListTFObligationsRequest, options?: CoinbaseCallOptions): Promise<ListTFObligationsResponse>;
56
+ listFinancingEligibleAssets(request?: ListFinancingEligibleAssetsRequest, options?: CoinbaseCallOptions): Promise<ListFinancingEligibleAssetsResponse>;
53
57
  }
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Brand } from '../shared/brand';
17
- import { GetExistingLocatesResponse, GetInterestAccrualsResponse, GetLocateAvailabilitiesResponse, GetMarginConversionsResponse, GetMarginSummariesResponse, GetMarginInformationResponse as internalGetMarginInformationResponse, GetBuyingPowerResponse, GetPostTradeCreditResponse, GetTFTieredPricingFeesResponse, GetWithdrawalPowerResponse, GetFcmMarginCallDetailsResponse as internalGetFcmMarginCallDetailsResponse, GetFcmRiskLimitsResponse as internalGetFcmRiskLimitsResponse, CreateNewLocatesResponse as internalCreateNewLocatesResponse, GetCrossMarginOverviewResponse as internalGetCrossMarginOverviewResponse } from '../model/';
17
+ import { GetExistingLocatesResponse, GetInterestAccrualsResponse, GetLocateAvailabilitiesResponse, GetMarginConversionsResponse, GetMarginSummariesResponse, GetMarginInformationResponse as internalGetMarginInformationResponse, GetBuyingPowerResponse, GetPostTradeCreditResponse, GetTFTieredPricingFeesResponse, GetWithdrawalPowerResponse, GetFcmMarginCallDetailsResponse as internalGetFcmMarginCallDetailsResponse, GetFcmRiskLimitsResponse as internalGetFcmRiskLimitsResponse, CreateNewLocatesResponse as internalCreateNewLocatesResponse, GetCrossMarginOverviewResponse as internalGetCrossMarginOverviewResponse, ListTFObligationsResponse as internalListTFObligationsResponse, ListFinancingEligibleAssetsResponse as internalListFinancingEligibleAssetsResponse } from '../model/';
18
18
  export type ListExistingLocatesRequest = {
19
19
  portfolioId: string;
20
20
  locateIds?: string[];
@@ -95,3 +95,9 @@ export type GetCrossMarginOverviewRequest = {
95
95
  entityId: string;
96
96
  };
97
97
  export type GetCrossMarginOverviewResponse = Brand<internalGetCrossMarginOverviewResponse, 'GetCrossMarginOverviewResponse'>;
98
+ export type ListTFObligationsRequest = {
99
+ entityId: string;
100
+ };
101
+ export type ListTFObligationsResponse = Brand<internalListTFObligationsResponse, 'ListTFObligationsResponse'>;
102
+ export type ListFinancingEligibleAssetsRequest = Record<string, never>;
103
+ export type ListFinancingEligibleAssetsResponse = Brand<internalListFinancingEligibleAssetsResponse, 'ListFinancingEligibleAssetsResponse'>;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { CoinbaseCallOptions, IPrimeApiClient } from '../clients';
17
- import { ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, CancelEntitySweepRequest, CancelEntitySweepResponse, GetEntityFuturesRiskLimitsRequest, GetEntityFuturesRiskLimitsResponse, GetEntityFuturesMarginCallDetailsRequest, GetEntityFuturesMarginCallDetailsResponse } from './types';
17
+ import { ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, CancelEntitySweepRequest, CancelEntitySweepResponse, GetEntityFuturesRiskLimitsRequest, GetEntityFuturesRiskLimitsResponse, GetEntityFuturesMarginCallDetailsRequest, GetEntityFuturesMarginCallDetailsResponse, GetFcmSettingsRequest, GetFcmSettingsResponse, SetFcmSettingsRequest, SetFcmSettingsResponse } from './types';
18
18
  export interface IFuturesService {
19
19
  listEntitySweeps(request: ListEntityFuturesSweepsRequest, options?: CoinbaseCallOptions): Promise<ListEntityFuturesSweepsResponse>;
20
20
  getEntityBalance(request: GetEntityFuturesBalanceRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesBalanceResponse>;
@@ -24,6 +24,8 @@ export interface IFuturesService {
24
24
  cancelEntitySweep(request: CancelEntitySweepRequest, options?: CoinbaseCallOptions): Promise<CancelEntitySweepResponse>;
25
25
  getRiskLimits(request: GetEntityFuturesRiskLimitsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesRiskLimitsResponse>;
26
26
  getMarginCallDetails(request: GetEntityFuturesMarginCallDetailsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesMarginCallDetailsResponse>;
27
+ getFcmSettings(request: GetFcmSettingsRequest, options?: CoinbaseCallOptions): Promise<GetFcmSettingsResponse>;
28
+ setFcmSettings(request: SetFcmSettingsRequest, options?: CoinbaseCallOptions): Promise<SetFcmSettingsResponse>;
27
29
  }
28
30
  export declare class FuturesService implements IFuturesService {
29
31
  private client;
@@ -36,5 +38,7 @@ export declare class FuturesService implements IFuturesService {
36
38
  cancelEntitySweep(request: CancelEntitySweepRequest, options?: CoinbaseCallOptions): Promise<CancelEntitySweepResponse>;
37
39
  getRiskLimits(request: GetEntityFuturesRiskLimitsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesRiskLimitsResponse>;
38
40
  getMarginCallDetails(request: GetEntityFuturesMarginCallDetailsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesMarginCallDetailsResponse>;
41
+ getFcmSettings(request: GetFcmSettingsRequest, options?: CoinbaseCallOptions): Promise<GetFcmSettingsResponse>;
42
+ setFcmSettings(request: SetFcmSettingsRequest, options?: CoinbaseCallOptions): Promise<SetFcmSettingsResponse>;
39
43
  }
40
- export type { ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, CancelEntitySweepRequest, CancelEntitySweepResponse, GetEntityFuturesRiskLimitsRequest, GetEntityFuturesRiskLimitsResponse, GetEntityFuturesMarginCallDetailsRequest, GetEntityFuturesMarginCallDetailsResponse, } from './types';
44
+ export type { ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, CancelEntitySweepRequest, CancelEntitySweepResponse, GetEntityFuturesRiskLimitsRequest, GetEntityFuturesRiskLimitsResponse, GetEntityFuturesMarginCallDetailsRequest, GetEntityFuturesMarginCallDetailsResponse, GetFcmSettingsRequest, GetFcmSettingsResponse, SetFcmSettingsRequest, SetFcmSettingsResponse, } from './types';
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Brand } from '../shared/brand';
17
- import { GetFcmBalanceResponse, GetFuturesSweepsResponse, GetPositionsResponse, SetAutoSweepResponse, ScheduleFuturesSweepRequest, ScheduleFuturesSweepResponse, CancelFuturesSweepResponse, GetFcmRiskLimitsResponse, GetFcmMarginCallDetailsResponse } from '../model/';
17
+ import { GetFcmBalanceResponse, GetFuturesSweepsResponse, GetPositionsResponse, SetAutoSweepResponse, ScheduleFuturesSweepRequest, ScheduleFuturesSweepResponse, CancelFuturesSweepResponse, GetFcmRiskLimitsResponse, GetFcmMarginCallDetailsResponse, GetFcmSettingsResponse as internalGetFcmSettingsResponse, SetFcmSettingsResponse as internalSetFcmSettingsResponse } from '../model/';
18
18
  export type ListEntityFuturesSweepsRequest = {
19
19
  entityId: string;
20
20
  };
@@ -49,3 +49,12 @@ export type GetEntityFuturesMarginCallDetailsRequest = {
49
49
  entityId: string;
50
50
  };
51
51
  export type GetEntityFuturesMarginCallDetailsResponse = Brand<GetFcmMarginCallDetailsResponse, 'GetEntityFuturesMarginCallDetailsResponse'>;
52
+ export type GetFcmSettingsRequest = {
53
+ entityId: string;
54
+ };
55
+ export type GetFcmSettingsResponse = Brand<internalGetFcmSettingsResponse, 'GetFcmSettingsResponse'>;
56
+ export type SetFcmSettingsRequest = {
57
+ entityId: string;
58
+ targetDerivativesExcess: string;
59
+ };
60
+ export type SetFcmSettingsResponse = Brand<internalSetFcmSettingsResponse, 'SetFcmSettingsResponse'>;
@@ -16,6 +16,9 @@
16
16
  export { CoinbaseClient, CoinbaseHttpClientRetryOptions, CoinbaseCallOptions, Method, CoinbaseClientException, CoinbaseError, CoinbaseResponse, TransformRequestFn, TransformResponseFn, CoinbasePrimeClientWithServices, CoinbasePrimeClientConfig, CoinbasePrimeClient, IPrimeApiClient, } from './clients';
17
17
  export { CoinbasePrimeCredentials } from './credentials';
18
18
  export { createCredentialsFromEnv } from './shared/envUtils';
19
+ export { CoinbasePrimeClientException, CoinbasePrimeException } from './errors';
20
+ export { validate, isValidUUID } from './shared/validation';
21
+ export type { ValidationError, PropertyValidator } from './shared/validation';
19
22
  export { ActivitiesService, IActivitiesService } from './activities';
20
23
  export { AddressBooksService, IAddressBooksService } from './addressBooks';
21
24
  export { AllocationService, IAllocationService } from './allocations';
@@ -19,6 +19,7 @@
19
19
  */
20
20
  import { OrderSide } from './enums/OrderSide';
21
21
  import { OrderType } from './enums/OrderType';
22
+ import { PegOffsetType } from './enums/PegOffsetType';
22
23
  import { TimeInForceType } from './enums/TimeInForceType';
23
24
  export type CreateOrderRequest = {
24
25
  productId: string;
@@ -42,7 +43,13 @@ export type CreateOrderRequest = {
42
43
  stopPrice?: string;
43
44
  settlCurrency?: string;
44
45
  /**
45
- * Post-only flag - when true, the order will only be posted to the order book and not immediately matched. Only applicable to LIMIT orders with GTC or GTD time in force. next: 20
46
+ * Post-only flag - when true, the order will only be posted to the order book and not immediately matched. Only applicable to LIMIT orders with GTC or GTD time in force.
46
47
  */
47
48
  postOnly?: boolean;
49
+ pegOffsetType?: PegOffsetType;
50
+ offset?: string;
51
+ /**
52
+ * next: 23
53
+ */
54
+ wigLevel?: string;
48
55
  };
@@ -17,6 +17,7 @@
17
17
  *
18
18
  * Do not edit the class manually.
19
19
  */
20
+ import { TravelRuleEntry } from './TravelRuleEntry';
20
21
  export type CreatePortfolioAddressBookEntryRequest = {
21
22
  /**
22
23
  * Crypto address to add
@@ -34,4 +35,9 @@ export type CreatePortfolioAddressBookEntryRequest = {
34
35
  * Account Identifier (memo/destination tag)
35
36
  */
36
37
  accountIdentifier?: string;
38
+ /**
39
+ * List of compatible chain IDs for the address, empty for Solana
40
+ */
41
+ chainIds?: Array<string>;
42
+ travelRuleData?: TravelRuleEntry;
37
43
  };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type DateOfBirth = {
21
+ year?: number;
22
+ month?: number;
23
+ day?: number;
24
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type DetailedAddress = {
21
+ address1?: string;
22
+ address2?: string;
23
+ address3?: string;
24
+ city?: string;
25
+ state?: string;
26
+ countryCode?: string;
27
+ postalCode?: string;
28
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type GetFcmSettingsResponse = {
21
+ /**
22
+ * Target derivatives excess in the FCM
23
+ */
24
+ targetDerivativesExcess?: string;
25
+ };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ import { ValidatorUnstakingInfo } from './ValidatorUnstakingInfo';
21
+ export type GetUnstakingStatusResponse = {
22
+ /**
23
+ * The portfolio ID
24
+ */
25
+ portfolioId: string;
26
+ /**
27
+ * The wallet ID
28
+ */
29
+ walletId: string;
30
+ /**
31
+ * The wallet address
32
+ */
33
+ walletAddress: string;
34
+ /**
35
+ * Current timestamp at time of API call
36
+ */
37
+ currentTimestamp: Date;
38
+ /**
39
+ * List of validators with unstaking information for this wallet
40
+ */
41
+ validators: Array<ValidatorUnstakingInfo>;
42
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ import { TFAsset } from './TFAsset';
21
+ export type ListFinancingEligibleAssetsResponse = {
22
+ /**
23
+ * List of assets eligible for Trade Finance
24
+ */
25
+ assets?: Array<TFAsset>;
26
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ import { TFObligation } from './TFObligation';
21
+ export type ListTFObligationsResponse = {
22
+ /**
23
+ * The list of obligations (loans) for the entity.
24
+ */
25
+ obligations?: Array<TFObligation>;
26
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ export type NaturalPersonName = {
21
+ firstName?: string;
22
+ middleName?: string;
23
+ lastName?: string;
24
+ };
@@ -52,4 +52,8 @@ export type NetworkDetails = {
52
52
  * Base URL to our recommended block explorer (crypto only)
53
53
  */
54
54
  networkLink?: string;
55
+ /**
56
+ * Indicates the symbol that can be used to query other endpoints, related to transactions, wallets, and activities, to get information particularly for this asset on the network
57
+ */
58
+ networkScopedSymbol?: string;
55
59
  };
@@ -140,4 +140,16 @@ export type Order = {
140
140
  * The maximum order size that will show up on venue order books (in base currency).
141
141
  */
142
142
  displayBaseSize?: string;
143
+ /**
144
+ * The peg offset type for PEG orders (PRICE, BASIS_POINTS, or CUMULATIVE_DEPTH_IN_BASE_UNITS)
145
+ */
146
+ pegOffsetType?: string;
147
+ /**
148
+ * The offset value for PEG orders
149
+ */
150
+ offset?: string;
151
+ /**
152
+ * The wig (would if good) level for PEG orders - best price opposite to limit_price
153
+ */
154
+ wigLevel?: string;
143
155
  };
@@ -19,6 +19,7 @@
19
19
  */
20
20
  import { OrderSide } from './enums/OrderSide';
21
21
  import { OrderType } from './enums/OrderType';
22
+ import { PegOffsetType } from './enums/PegOffsetType';
22
23
  import { TimeInForceType } from './enums/TimeInForceType';
23
24
  export type OrderPreviewRequest = {
24
25
  productId: string;
@@ -46,4 +47,10 @@ export type OrderPreviewRequest = {
46
47
  * The maximum order size that will show up on venue order books (in base currency).
47
48
  */
48
49
  displayBaseSize?: string;
50
+ pegOffsetType?: PegOffsetType;
51
+ offset?: string;
52
+ /**
53
+ * next: 21
54
+ */
55
+ wigLevel?: string;
49
56
  };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ /**
21
+ * PreviewUnstakeRequest represents a request to preview an unstaking operation.
22
+ */
23
+ export type PreviewUnstakeRequest = {
24
+ /**
25
+ * Amount to preview unstaking
26
+ */
27
+ amount: string;
28
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ /**
21
+ * PreviewUnstakeResponse contains the response data from previewing an unstaking operation.
22
+ */
23
+ export type PreviewUnstakeResponse = {
24
+ /**
25
+ * Estimated amount that would be unstaked
26
+ */
27
+ estimatedAmount: string;
28
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ import { TravelRuleStatus } from './enums/TravelRuleStatus';
21
+ export type ProcessRequirements = {
22
+ travelRuleStatus?: TravelRuleStatus;
23
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright 2025-present Coinbase Global, Inc.
3
+ *
4
+ * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ *
18
+ * Do not edit the class manually.
19
+ */
20
+ import { RewardSubtype } from './enums/RewardSubtype';
21
+ export type RewardMetadata = {
22
+ subtype?: RewardSubtype;
23
+ };