@coinbase-sample/prime-sdk-ts 0.2.1 → 0.3.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.
- package/dist/balances/index.d.ts +3 -1
- package/dist/balances/index.js +12 -1
- package/dist/balances/types.d.ts +9 -0
- package/dist/financing/index.d.ts +49 -0
- package/dist/financing/index.js +144 -0
- package/dist/financing/types.d.ts +94 -0
- package/dist/financing/types.js +2 -0
- package/dist/futures/index.d.ts +5 -5
- package/dist/futures/types.d.ts +2 -2
- package/dist/index.d.ts +19 -0
- package/dist/index.js +3 -1
- package/dist/model/AcceptQuoteRequest.d.ts +1 -0
- package/dist/model/Accrual.d.ts +83 -0
- package/dist/model/Accrual.js +21 -0
- package/dist/model/AddressEntry.d.ts +0 -3
- package/dist/model/AddressGroup.d.ts +1 -0
- package/dist/model/AssetBalance.d.ts +41 -0
- package/dist/model/AssetBalance.js +21 -0
- package/dist/model/Balance.d.ts +4 -0
- package/dist/model/BuyingPower.d.ts +41 -0
- package/dist/model/BuyingPower.js +21 -0
- package/dist/model/Conversion.d.ts +36 -0
- package/dist/model/Conversion.js +21 -0
- package/dist/model/ConversionDetail.d.ts +49 -0
- package/dist/model/ConversionDetail.js +21 -0
- package/dist/model/CreateNewLocatesRequest.d.ts +37 -0
- package/dist/model/CreateNewLocatesRequest.js +21 -0
- package/dist/model/CreateNewLocatesResponse.d.ts +22 -0
- package/dist/model/CreateNewLocatesResponse.js +21 -0
- package/dist/model/CreateOrderRequest.d.ts +4 -0
- package/dist/model/EntityBalance.d.ts +41 -0
- package/dist/model/EntityBalance.js +21 -0
- package/dist/model/ExistingLocate.d.ts +65 -0
- package/dist/model/ExistingLocate.js +21 -0
- package/dist/model/Fill.d.ts +4 -0
- package/dist/model/GetBuyingPowerResponse.d.ts +23 -0
- package/dist/model/GetBuyingPowerResponse.js +21 -0
- package/dist/model/GetExistingLocatesResponse.d.ts +23 -0
- package/dist/model/GetExistingLocatesResponse.js +21 -0
- package/dist/model/GetInterestAccrualsResponse.d.ts +24 -0
- package/dist/model/GetInterestAccrualsResponse.js +21 -0
- package/dist/model/GetLocateAvailabilitiesResponse.d.ts +23 -0
- package/dist/model/GetLocateAvailabilitiesResponse.js +21 -0
- package/dist/model/GetMarginConversionsResponse.d.ts +23 -0
- package/dist/model/GetMarginConversionsResponse.js +21 -0
- package/dist/model/GetMarginInformationResponse.d.ts +23 -0
- package/dist/model/GetMarginInformationResponse.js +21 -0
- package/dist/model/GetMarginSummariesResponse.d.ts +23 -0
- package/dist/model/GetMarginSummariesResponse.js +21 -0
- package/dist/model/GetPortfolioInterestAccrualsResponse.d.ts +24 -0
- package/dist/model/GetPortfolioInterestAccrualsResponse.js +21 -0
- package/dist/model/GetTFTieredPricingFeesResponse.d.ts +23 -0
- package/dist/model/GetTFTieredPricingFeesResponse.js +21 -0
- package/dist/model/GetWithdrawalPowerResponse.d.ts +23 -0
- package/dist/model/GetWithdrawalPowerResponse.js +21 -0
- package/dist/model/ListAggregateEntityPositionsResponse.d.ts +25 -0
- package/dist/model/ListAggregateEntityPositionsResponse.js +21 -0
- package/dist/model/ListEntityBalancesResponse.d.ts +25 -0
- package/dist/model/ListEntityBalancesResponse.js +21 -0
- package/dist/model/ListEntityPositionsResponse.d.ts +25 -0
- package/dist/model/ListEntityPositionsResponse.js +21 -0
- package/dist/model/LoanInfo.d.ts +41 -0
- package/dist/model/LoanInfo.js +21 -0
- package/dist/model/Locate.d.ts +33 -0
- package/dist/model/Locate.js +21 -0
- package/dist/model/MarginAddOn.d.ts +27 -0
- package/dist/model/MarginAddOn.js +21 -0
- package/dist/model/MarginCallRecord.d.ts +41 -0
- package/dist/model/MarginCallRecord.js +21 -0
- package/dist/model/MarginInformation.d.ts +28 -0
- package/dist/model/MarginInformation.js +21 -0
- package/dist/model/MarginSummary.d.ts +151 -0
- package/dist/model/MarginSummary.js +21 -0
- package/dist/model/MarginSummaryHistorical.d.ts +31 -0
- package/dist/model/MarginSummaryHistorical.js +21 -0
- package/dist/model/MarketRate.d.ts +29 -0
- package/dist/model/MarketRate.js +21 -0
- package/dist/model/Order.d.ts +4 -0
- package/dist/model/OrderPreviewRequest.d.ts +4 -0
- package/dist/model/PMAssetInfo.d.ts +89 -0
- package/dist/model/PMAssetInfo.js +21 -0
- package/dist/model/Position.d.ts +35 -0
- package/dist/model/Position.js +21 -0
- package/dist/model/PositionReference.d.ts +27 -0
- package/dist/model/PositionReference.js +21 -0
- package/dist/model/Product.d.ts +2 -0
- package/dist/model/RFQ.d.ts +1 -0
- package/dist/model/RFQProductDetails.d.ts +24 -0
- package/dist/model/RFQProductDetails.js +21 -0
- package/dist/model/RpcConfig.d.ts +1 -1
- package/dist/model/ShortCollateral.d.ts +37 -0
- package/dist/model/ShortCollateral.js +21 -0
- package/dist/model/TieredPricingFee.d.ts +29 -0
- package/dist/model/TieredPricingFee.js +21 -0
- package/dist/model/WithdrawalPower.d.ts +29 -0
- package/dist/model/WithdrawalPower.js +21 -0
- package/dist/model/enums/Benchmark.d.ts +26 -0
- package/dist/model/enums/Benchmark.js +30 -0
- package/dist/model/enums/LoanType.d.ts +27 -0
- package/dist/model/enums/LoanType.js +31 -0
- package/dist/model/enums/MarginAddOnType.d.ts +26 -0
- package/dist/model/enums/MarginAddOnType.js +30 -0
- package/dist/model/enums/NetworkType.d.ts +1 -0
- package/dist/model/enums/NetworkType.js +1 -0
- package/dist/model/enums/PortfolioBalanceType.d.ts +2 -1
- package/dist/model/enums/PortfolioBalanceType.js +1 -0
- package/dist/model/enums/PositionReferenceType.d.ts +24 -0
- package/dist/model/enums/PositionReferenceType.js +28 -0
- package/dist/model/enums/RateType.d.ts +26 -0
- package/dist/model/enums/RateType.js +30 -0
- package/dist/portfolios/index.d.ts +3 -3
- package/dist/portfolios/index.js +1 -1
- package/dist/portfolios/types.d.ts +1 -0
- package/dist/positions/index.d.ts +29 -0
- package/dist/positions/index.js +40 -0
- package/dist/positions/types.d.ts +14 -0
- package/dist/positions/types.js +2 -0
- package/dist/wallets/index.d.ts +5 -1
- package/dist/wallets/index.js +51 -0
- package/dist/wallets/types.d.ts +22 -0
- package/package.json +12 -11
package/dist/balances/index.d.ts
CHANGED
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
17
17
|
import { CoinbasePrimeClient } from '../client';
|
|
18
18
|
import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
|
|
19
|
-
import { GetWalletBalanceRequest, GetWalletBalanceResponse, ListOnchainWalletBalancesRequest, ListOnchainWalletBalancesResponse, ListPortfolioBalancesRequest, ListPortfolioBalancesResponse } from './types';
|
|
19
|
+
import { GetWalletBalanceRequest, GetWalletBalanceResponse, ListOnchainWalletBalancesRequest, ListOnchainWalletBalancesResponse, ListPortfolioBalancesRequest, ListPortfolioBalancesResponse, ListEntityBalancesRequest, ListEntityBalancesResponse } from './types';
|
|
20
20
|
export interface IBalancesService {
|
|
21
21
|
listPortfolioBalances(request: ListPortfolioBalancesRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
22
22
|
getWalletBalance(request: GetWalletBalanceRequest, options?: CoinbaseCallOptions): Promise<GetWalletBalanceResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
23
23
|
listOnchainWalletBalances(request: ListOnchainWalletBalancesRequest, options?: CoinbaseCallOptions): Promise<ListOnchainWalletBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
24
|
+
listEntityBalances(request: ListEntityBalancesRequest, options?: CoinbaseCallOptions): Promise<ListEntityBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
24
25
|
}
|
|
25
26
|
export declare class BalancesService implements IBalancesService {
|
|
26
27
|
private client;
|
|
@@ -28,4 +29,5 @@ export declare class BalancesService implements IBalancesService {
|
|
|
28
29
|
listPortfolioBalances(request: ListPortfolioBalancesRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
29
30
|
getWalletBalance(request: GetWalletBalanceRequest, options?: CoinbaseCallOptions): Promise<GetWalletBalanceResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
30
31
|
listOnchainWalletBalances(request: ListOnchainWalletBalancesRequest, options?: CoinbaseCallOptions): Promise<ListOnchainWalletBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
32
|
+
listEntityBalances(request: ListEntityBalancesRequest, options?: CoinbaseCallOptions): Promise<ListEntityBalancesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
31
33
|
}
|
package/dist/balances/index.js
CHANGED
|
@@ -38,7 +38,18 @@ class BalancesService {
|
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined, walletId: undefined });
|
|
40
40
|
const response = yield this.client.request({
|
|
41
|
-
url: `portfolios/${request.portfolioId}wallets/${request.walletId}/web3_balances`,
|
|
41
|
+
url: `portfolios/${request.portfolioId}/wallets/${request.walletId}/web3_balances`,
|
|
42
|
+
queryParams,
|
|
43
|
+
callOptions: options,
|
|
44
|
+
});
|
|
45
|
+
return response.data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
listEntityBalances(request, options) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const queryParams = Object.assign(Object.assign({}, request), { entityId: undefined });
|
|
51
|
+
const response = yield this.client.request({
|
|
52
|
+
url: `entities/${request.entityId}/balances`,
|
|
42
53
|
queryParams,
|
|
43
54
|
callOptions: options,
|
|
44
55
|
});
|
package/dist/balances/types.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { VisibilityStatus } from '../model/enums/VisibilityStatus';
|
|
|
18
18
|
import { GetPortfolioBalancesResponse } from '../model/GetPortfolioBalancesResponse';
|
|
19
19
|
import { GetWalletBalanceResponse as internalGetResp } from '../model/GetWalletBalanceResponse';
|
|
20
20
|
import { ListWeb3WalletBalancesResponse } from '../model/ListWeb3WalletBalancesResponse';
|
|
21
|
+
import { ListEntityBalancesResponse as internalListEntityBalances } from '../model/ListEntityBalancesResponse';
|
|
21
22
|
export type ListPortfolioBalancesRequest = {
|
|
22
23
|
portfolioId: string;
|
|
23
24
|
symbol: string;
|
|
@@ -37,3 +38,11 @@ export type ListOnchainWalletBalancesRequest = {
|
|
|
37
38
|
limit?: number;
|
|
38
39
|
};
|
|
39
40
|
export type ListOnchainWalletBalancesResponse = ListWeb3WalletBalancesResponse;
|
|
41
|
+
export type ListEntityBalancesRequest = {
|
|
42
|
+
entityId: string;
|
|
43
|
+
symbols?: string;
|
|
44
|
+
cursor?: string;
|
|
45
|
+
limit?: number;
|
|
46
|
+
aggregationType?: PortfolioBalanceType;
|
|
47
|
+
};
|
|
48
|
+
export type ListEntityBalancesResponse = internalListEntityBalances;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
17
|
+
import { CoinbasePrimeClient } from '../client';
|
|
18
|
+
import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
|
|
19
|
+
import { ListExistingLocatesRequest, ListExistingLocatesResponse, ListInterestAccrualsRequest, ListInterestAccrualsResponse, ListPortfolioInterestAccrualsRequest, ListPortfolioInterestAccrualsResponse, ListMarginCallSummariesRequest, ListMarginCallSummariesResponse, ListMarginConversionsRequest, ListMarginConversionsResponse, GetEntityLocateAvailabilitiesRequest, GetEntityLocateAvailabilitiesResponse, GetMarginInformationRequest, GetMarginInformationResponse, GetPortfolioBuyingPowerRequest, GetPortfolioBuyingPowerResponse, GetPortfolioCreditInformationRequest, GetPortfolioCreditInformationResponse, GetPortfolioWithdrawalPowerRequest, GetPortfolioWithdrawalPowerResponse, GetTieredPricingFeesRequest, GetTieredPricingFeesResponse, CreateNewLocatesRequest, CreateNewLocatesResponse } from './types';
|
|
20
|
+
export interface IFinancingService {
|
|
21
|
+
listExistingLocates(request: ListExistingLocatesRequest, options?: CoinbaseCallOptions): Promise<ListExistingLocatesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
22
|
+
listInterestAccruals(request: ListInterestAccrualsRequest, options?: CoinbaseCallOptions): Promise<ListInterestAccrualsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
23
|
+
listPortfolioInterestAccruals(request: ListPortfolioInterestAccrualsRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioInterestAccrualsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
24
|
+
listMarginCallSummaries(request: ListMarginCallSummariesRequest, options?: CoinbaseCallOptions): Promise<ListMarginCallSummariesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
25
|
+
listMarginConversions(request: ListMarginConversionsRequest, options?: CoinbaseCallOptions): Promise<ListMarginConversionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
26
|
+
getEntityLocateAvailabilities(request: GetEntityLocateAvailabilitiesRequest, options?: CoinbaseCallOptions): Promise<GetEntityLocateAvailabilitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
27
|
+
getMarginInformation(request: GetMarginInformationRequest, options?: CoinbaseCallOptions): Promise<GetMarginInformationResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
28
|
+
getPortfolioBuyingPower(request: GetPortfolioBuyingPowerRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioBuyingPowerResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
29
|
+
getPortfolioCreditInformation(request: GetPortfolioCreditInformationRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditInformationResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
30
|
+
getPortfolioWithdrawalPower(request: GetPortfolioWithdrawalPowerRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioWithdrawalPowerResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
31
|
+
getTieredPricingFees(request: GetTieredPricingFeesRequest, options?: CoinbaseCallOptions): Promise<GetTieredPricingFeesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
32
|
+
createNewLocates(request: CreateNewLocatesRequest, options?: CoinbaseCallOptions): Promise<CreateNewLocatesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
33
|
+
}
|
|
34
|
+
export declare class FinancingService implements IFinancingService {
|
|
35
|
+
private client;
|
|
36
|
+
constructor(client: CoinbasePrimeClient);
|
|
37
|
+
listExistingLocates(request: ListExistingLocatesRequest, options?: CoinbaseCallOptions): Promise<ListExistingLocatesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
38
|
+
listInterestAccruals(request: ListInterestAccrualsRequest, options?: CoinbaseCallOptions): Promise<ListInterestAccrualsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
39
|
+
listPortfolioInterestAccruals(request: ListPortfolioInterestAccrualsRequest, options?: CoinbaseCallOptions): Promise<ListPortfolioInterestAccrualsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
40
|
+
listMarginCallSummaries(request: ListMarginCallSummariesRequest, options?: CoinbaseCallOptions): Promise<ListMarginCallSummariesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
41
|
+
listMarginConversions(request: ListMarginConversionsRequest, options?: CoinbaseCallOptions): Promise<ListMarginConversionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
42
|
+
getEntityLocateAvailabilities(request: GetEntityLocateAvailabilitiesRequest, options?: CoinbaseCallOptions): Promise<GetEntityLocateAvailabilitiesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
43
|
+
getMarginInformation(request: GetMarginInformationRequest, options?: CoinbaseCallOptions): Promise<GetMarginInformationResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
44
|
+
getPortfolioBuyingPower(request: GetPortfolioBuyingPowerRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioBuyingPowerResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
45
|
+
getPortfolioCreditInformation(request: GetPortfolioCreditInformationRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioCreditInformationResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
46
|
+
getPortfolioWithdrawalPower(request: GetPortfolioWithdrawalPowerRequest, options?: CoinbaseCallOptions): Promise<GetPortfolioWithdrawalPowerResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
47
|
+
getTieredPricingFees(request: GetTieredPricingFeesRequest, options?: CoinbaseCallOptions): Promise<GetTieredPricingFeesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
48
|
+
createNewLocates(request: CreateNewLocatesRequest, options?: CoinbaseCallOptions): Promise<CreateNewLocatesResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FinancingService = void 0;
|
|
13
|
+
class FinancingService {
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
listExistingLocates(request, options) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const response = yield this.client.request({
|
|
20
|
+
url: `portfolios/${request.portfolioId}/locates`,
|
|
21
|
+
callOptions: options,
|
|
22
|
+
});
|
|
23
|
+
return response.data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
listInterestAccruals(request, options) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const queryParams = Object.assign(Object.assign({}, request), { entityId: undefined });
|
|
29
|
+
const response = yield this.client.request({
|
|
30
|
+
url: `entities/${request.entityId}/accruals`,
|
|
31
|
+
callOptions: options,
|
|
32
|
+
queryParams,
|
|
33
|
+
});
|
|
34
|
+
return response.data;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
listPortfolioInterestAccruals(request, options) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
|
|
40
|
+
const response = yield this.client.request({
|
|
41
|
+
url: `portfolios/${request.portfolioId}/accruals`,
|
|
42
|
+
callOptions: options,
|
|
43
|
+
queryParams,
|
|
44
|
+
});
|
|
45
|
+
return response.data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
listMarginCallSummaries(request, options) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const queryParams = Object.assign(Object.assign({}, request), { entityId: undefined });
|
|
51
|
+
const response = yield this.client.request({
|
|
52
|
+
url: `entities/${request.entityId}/margin_summaries`,
|
|
53
|
+
callOptions: options,
|
|
54
|
+
queryParams,
|
|
55
|
+
});
|
|
56
|
+
return response.data;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
listMarginConversions(request, options) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
|
|
62
|
+
const response = yield this.client.request({
|
|
63
|
+
url: `portfolios/${request.portfolioId}/margin_conversions`,
|
|
64
|
+
callOptions: options,
|
|
65
|
+
queryParams,
|
|
66
|
+
});
|
|
67
|
+
return response.data;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
getEntityLocateAvailabilities(request, options) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const queryParams = Object.assign(Object.assign({}, request), { entityId: undefined });
|
|
73
|
+
const response = yield this.client.request({
|
|
74
|
+
url: `entities/${request.entityId}/locates_availability`,
|
|
75
|
+
callOptions: options,
|
|
76
|
+
queryParams,
|
|
77
|
+
});
|
|
78
|
+
return response.data;
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
getMarginInformation(request, options) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const response = yield this.client.request({
|
|
84
|
+
url: `entities/${request.entityId}/margin`,
|
|
85
|
+
callOptions: options,
|
|
86
|
+
});
|
|
87
|
+
return response.data;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
getPortfolioBuyingPower(request, options) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
|
|
93
|
+
const response = yield this.client.request({
|
|
94
|
+
url: `portfolios/${request.portfolioId}/buying_power`,
|
|
95
|
+
callOptions: options,
|
|
96
|
+
queryParams,
|
|
97
|
+
});
|
|
98
|
+
return response.data;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getPortfolioCreditInformation(request, options) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const response = yield this.client.request({
|
|
104
|
+
url: `portfolios/${request.portfolioId}/credit`,
|
|
105
|
+
callOptions: options,
|
|
106
|
+
});
|
|
107
|
+
return response.data;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
getPortfolioWithdrawalPower(request, options) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const queryParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
|
|
113
|
+
const response = yield this.client.request({
|
|
114
|
+
url: `portfolios/${request.portfolioId}/withdrawal_power`,
|
|
115
|
+
callOptions: options,
|
|
116
|
+
queryParams,
|
|
117
|
+
});
|
|
118
|
+
return response.data;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
getTieredPricingFees(request, options) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const queryParams = Object.assign(Object.assign({}, request), { entityId: undefined });
|
|
124
|
+
const response = yield this.client.request({
|
|
125
|
+
url: `entities/${request.entityId}/tf_tiered_fees`,
|
|
126
|
+
callOptions: options,
|
|
127
|
+
queryParams,
|
|
128
|
+
});
|
|
129
|
+
return response.data;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
createNewLocates(request, options) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const bodyParams = Object.assign(Object.assign({}, request), { portfolioId: undefined });
|
|
135
|
+
const response = yield this.client.request({
|
|
136
|
+
url: `portfolios/${request.portfolioId}/locates`,
|
|
137
|
+
callOptions: options,
|
|
138
|
+
bodyParams,
|
|
139
|
+
});
|
|
140
|
+
return response.data;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.FinancingService = FinancingService;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { GetExistingLocatesResponse } from '../model/GetExistingLocatesResponse';
|
|
17
|
+
import { GetInterestAccrualsResponse } from '../model/GetInterestAccrualsResponse';
|
|
18
|
+
import { GetLocateAvailabilitiesResponse } from '../model/GetLocateAvailabilitiesResponse';
|
|
19
|
+
import { GetMarginConversionsResponse } from '../model/GetMarginConversionsResponse';
|
|
20
|
+
import { GetMarginSummariesResponse } from '../model/GetMarginSummariesResponse';
|
|
21
|
+
import { GetMarginInformationResponse as internalGetMarginInformationResponse } from '../model/GetMarginInformationResponse';
|
|
22
|
+
import { GetBuyingPowerResponse } from '../model/GetBuyingPowerResponse';
|
|
23
|
+
import { GetPostTradeCreditResponse } from '../model/GetPostTradeCreditResponse';
|
|
24
|
+
import { GetTFTieredPricingFeesResponse } from '../model/GetTFTieredPricingFeesResponse';
|
|
25
|
+
import { GetWithdrawalPowerResponse } from '../model/GetWithdrawalPowerResponse';
|
|
26
|
+
import { CreateNewLocatesResponse as internalCreateNewLocatesResponse } from '../model/CreateNewLocatesResponse';
|
|
27
|
+
export type ListExistingLocatesRequest = {
|
|
28
|
+
portfolioId: string;
|
|
29
|
+
locateIds?: string[];
|
|
30
|
+
conversionDate?: string;
|
|
31
|
+
locateDate?: string;
|
|
32
|
+
};
|
|
33
|
+
export type ListExistingLocatesResponse = GetExistingLocatesResponse;
|
|
34
|
+
export type ListInterestAccrualsRequest = {
|
|
35
|
+
entityId: string;
|
|
36
|
+
portfolioId?: string;
|
|
37
|
+
startDate?: string;
|
|
38
|
+
endDate?: string;
|
|
39
|
+
};
|
|
40
|
+
export type ListInterestAccrualsResponse = GetInterestAccrualsResponse;
|
|
41
|
+
export type ListPortfolioInterestAccrualsRequest = {
|
|
42
|
+
portfolioId: string;
|
|
43
|
+
startDate?: string;
|
|
44
|
+
endDate?: string;
|
|
45
|
+
};
|
|
46
|
+
export type ListPortfolioInterestAccrualsResponse = GetInterestAccrualsResponse;
|
|
47
|
+
export type ListMarginCallSummariesRequest = {
|
|
48
|
+
entityId: string;
|
|
49
|
+
startDate?: string;
|
|
50
|
+
endDate?: string;
|
|
51
|
+
};
|
|
52
|
+
export type ListMarginCallSummariesResponse = GetMarginSummariesResponse;
|
|
53
|
+
export type ListMarginConversionsRequest = {
|
|
54
|
+
portfolioId: string;
|
|
55
|
+
startDate?: string;
|
|
56
|
+
endDate?: string;
|
|
57
|
+
};
|
|
58
|
+
export type ListMarginConversionsResponse = GetMarginConversionsResponse;
|
|
59
|
+
export type GetEntityLocateAvailabilitiesRequest = {
|
|
60
|
+
entityId: string;
|
|
61
|
+
locateDate?: string;
|
|
62
|
+
};
|
|
63
|
+
export type GetEntityLocateAvailabilitiesResponse = GetLocateAvailabilitiesResponse;
|
|
64
|
+
export type GetMarginInformationRequest = {
|
|
65
|
+
entityId: string;
|
|
66
|
+
};
|
|
67
|
+
export type GetMarginInformationResponse = internalGetMarginInformationResponse;
|
|
68
|
+
export type GetPortfolioBuyingPowerRequest = {
|
|
69
|
+
portfolioId: string;
|
|
70
|
+
baseCurrency: string;
|
|
71
|
+
quoteCurrency: string;
|
|
72
|
+
};
|
|
73
|
+
export type GetPortfolioBuyingPowerResponse = GetBuyingPowerResponse;
|
|
74
|
+
export type GetPortfolioCreditInformationRequest = {
|
|
75
|
+
portfolioId: string;
|
|
76
|
+
};
|
|
77
|
+
export type GetPortfolioCreditInformationResponse = GetPostTradeCreditResponse;
|
|
78
|
+
export type GetPortfolioWithdrawalPowerRequest = {
|
|
79
|
+
portfolioId: string;
|
|
80
|
+
symbol: string;
|
|
81
|
+
};
|
|
82
|
+
export type GetPortfolioWithdrawalPowerResponse = GetWithdrawalPowerResponse;
|
|
83
|
+
export type GetTieredPricingFeesRequest = {
|
|
84
|
+
entityId: string;
|
|
85
|
+
effectiveAt?: string;
|
|
86
|
+
};
|
|
87
|
+
export type GetTieredPricingFeesResponse = GetTFTieredPricingFeesResponse;
|
|
88
|
+
export type CreateNewLocatesRequest = {
|
|
89
|
+
portfolioId: string;
|
|
90
|
+
symbol?: string;
|
|
91
|
+
amount?: string;
|
|
92
|
+
locateDate?: string;
|
|
93
|
+
};
|
|
94
|
+
export type CreateNewLocatesResponse = internalCreateNewLocatesResponse;
|
package/dist/futures/index.d.ts
CHANGED
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
import { CoinbaseCallOptions } from '@coinbase-sample/core-ts';
|
|
17
17
|
import { CoinbasePrimeClient } from '../client';
|
|
18
18
|
import { CoinbasePrimeClientException, CoinbasePrimeException } from '../errors';
|
|
19
|
-
import {
|
|
19
|
+
import { ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, CancelEntitySweepRequest, CancelEntitySweepResponse } from './types';
|
|
20
20
|
export interface IFuturesService {
|
|
21
|
-
listEntitySweeps(request:
|
|
21
|
+
listEntitySweeps(request: ListEntityFuturesSweepsRequest, options?: CoinbaseCallOptions): Promise<ListEntityFuturesSweepsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
22
22
|
getEntityBalance(request: GetEntityFuturesBalanceRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesBalanceResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
23
23
|
getEntityPositions(request: GetEntityFuturesPositionsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
24
24
|
scheduleEntitySweep(request: ScheduleEntityFuturesSweepRequest, options?: CoinbaseCallOptions): Promise<ScheduleEntityFuturesSweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
25
|
-
updateEntityAutoSweep(request:
|
|
25
|
+
updateEntityAutoSweep(request: UpdateEntityFuturesAutoSweepRequest, options?: CoinbaseCallOptions): Promise<UpdateEntityFuturesAutoSweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
26
26
|
cancelEntitySweep(request: CancelEntitySweepRequest, options?: CoinbaseCallOptions): Promise<CancelEntitySweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
27
27
|
}
|
|
28
28
|
export declare class FuturesService implements IFuturesService {
|
|
29
29
|
private client;
|
|
30
30
|
constructor(client: CoinbasePrimeClient);
|
|
31
|
-
listEntitySweeps(request:
|
|
31
|
+
listEntitySweeps(request: ListEntityFuturesSweepsRequest, options?: CoinbaseCallOptions): Promise<ListEntityFuturesSweepsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
32
32
|
getEntityBalance(request: GetEntityFuturesBalanceRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesBalanceResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
33
33
|
getEntityPositions(request: GetEntityFuturesPositionsRequest, options?: CoinbaseCallOptions): Promise<GetEntityFuturesPositionsResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
34
34
|
scheduleEntitySweep(request: ScheduleEntityFuturesSweepRequest, options?: CoinbaseCallOptions): Promise<ScheduleEntityFuturesSweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
35
|
-
updateEntityAutoSweep(request:
|
|
35
|
+
updateEntityAutoSweep(request: UpdateEntityFuturesAutoSweepRequest, options?: CoinbaseCallOptions): Promise<UpdateEntityFuturesAutoSweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
36
36
|
cancelEntitySweep(request: CancelEntitySweepRequest, options?: CoinbaseCallOptions): Promise<CancelEntitySweepResponse | CoinbasePrimeClientException | CoinbasePrimeException>;
|
|
37
37
|
}
|
package/dist/futures/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { SetAutoSweepResponse } from '../model/SetAutoSweepResponse';
|
|
|
20
20
|
import { ScheduleFuturesSweepRequest } from '../model/ScheduleFuturesSweepRequest';
|
|
21
21
|
import { ScheduleFuturesSweepResponse } from '../model/ScheduleFuturesSweepResponse';
|
|
22
22
|
import { CancelFuturesSweepResponse } from '../model/CancelFuturesSweepResponse';
|
|
23
|
-
export type
|
|
23
|
+
export type ListEntityFuturesSweepsRequest = {
|
|
24
24
|
entityId: string;
|
|
25
25
|
};
|
|
26
26
|
export type ListEntityFuturesSweepsResponse = GetFuturesSweepsResponse;
|
|
@@ -33,7 +33,7 @@ export type GetEntityFuturesPositionsRequest = {
|
|
|
33
33
|
productId?: string;
|
|
34
34
|
};
|
|
35
35
|
export type GetEntityFuturesPositionsResponse = GetPositionsResponse;
|
|
36
|
-
export type
|
|
36
|
+
export type UpdateEntityFuturesAutoSweepRequest = {
|
|
37
37
|
entityId: string;
|
|
38
38
|
autoSweep: boolean;
|
|
39
39
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,26 @@ export { OnchainAddressBookService } from './onchainAddressBook';
|
|
|
27
27
|
export { OrdersService, IOrdersService } from './orders';
|
|
28
28
|
export { PaymentMethodsService, IPaymentMethodsService, } from './paymentMethods';
|
|
29
29
|
export { PortfoliosService, IPortfoliosService } from './portfolios';
|
|
30
|
+
export { PositionsService, IPositionsService } from './positions';
|
|
30
31
|
export { ProductsService, IProductsService } from './products';
|
|
31
32
|
export { TransactionsService, ITransactionsService } from './transactions';
|
|
32
33
|
export { UsersService, IUsersService } from './users';
|
|
33
34
|
export { WalletsService, IWalletsService } from './wallets';
|
|
35
|
+
export type { GetActivityRequest, GetActivityResponse, GetPortfolioActivitiesRequest, GetPortfolioActivityResponse, ListEntityActivitiesRequest, ListEntityActivitiesResponse, ListPortfolioActivitiesRequest, ListPortfolioActivitiesResponse, } from './activities/types';
|
|
36
|
+
export type { CreateAddressBookRequest, CreateAddressBookResponse, ListAddressBooksRequest, ListAddressBooksResponse, } from './addressBooks/types';
|
|
37
|
+
export type { CreateAllocationRequest, CreateAllocationResponse, CreateNetAllocationRequest, CreateNetAllocationResponse, ListNetAllocationsRequest, ListNetAllocationsResponse, ListPortfolioAllocationsRequest, ListPortfolioAllocationsResponse, GetAllocationRequest, GetAllocationResponse, } from './allocations/types';
|
|
38
|
+
export type { ListAssetsRequest, ListAssetsResponse } from './assets/types';
|
|
39
|
+
export type { GetWalletBalanceRequest, GetWalletBalanceResponse, ListOnchainWalletBalancesRequest, ListOnchainWalletBalancesResponse, ListPortfolioBalancesRequest, ListPortfolioBalancesResponse, ListEntityBalancesRequest, ListEntityBalancesResponse, } from './balances/types';
|
|
40
|
+
export type { GetPortfolioCommissionRequest, GetPortfolioCommissionResponse, } from './commission/types';
|
|
41
|
+
export type { ListExistingLocatesRequest, ListExistingLocatesResponse, ListInterestAccrualsRequest, ListInterestAccrualsResponse, ListPortfolioInterestAccrualsRequest, ListPortfolioInterestAccrualsResponse, ListMarginCallSummariesRequest, ListMarginCallSummariesResponse, ListMarginConversionsRequest, ListMarginConversionsResponse, GetEntityLocateAvailabilitiesRequest, GetEntityLocateAvailabilitiesResponse, GetMarginInformationRequest, GetMarginInformationResponse, GetPortfolioBuyingPowerRequest, GetPortfolioBuyingPowerResponse, GetPortfolioCreditInformationRequest, GetPortfolioCreditInformationResponse, GetPortfolioWithdrawalPowerRequest, GetPortfolioWithdrawalPowerResponse, GetTieredPricingFeesRequest, GetTieredPricingFeesResponse, CreateNewLocatesRequest, CreateNewLocatesResponse, } from './financing/types';
|
|
42
|
+
export type { CancelEntitySweepRequest, CancelEntitySweepResponse, GetEntityFuturesBalanceRequest, GetEntityFuturesBalanceResponse, GetEntityFuturesPositionsRequest, GetEntityFuturesPositionsResponse, ListEntityFuturesSweepsRequest, ListEntityFuturesSweepsResponse, ScheduleEntityFuturesSweepRequest, ScheduleEntityFuturesSweepResponse, UpdateEntityFuturesAutoSweepRequest, UpdateEntityFuturesAutoSweepResponse, } from './futures/types';
|
|
43
|
+
export type { ListInvoicesRequest, ListInvoicesResponse, } from './invoices/types';
|
|
44
|
+
export type { CreateOnchainAddressBookEntryRequest, CreateOnchainAddressBookEntryResponse, DeleteOnchainAddressBookEntryRequest, DeleteOnchainAddressBookEntryResponse, ListOnchainAddressBookRequest, ListOnchainAddressBookResponse, UpdateOnchainAddressBookEntryRequest, UpdateOnchainAddressBookEntryResponse, } from './onchainAddressBook/types';
|
|
45
|
+
export type { AcceptQuoteRequest, AcceptQuoteResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderPreviewRequest, CreateOrderPreviewResponse, CreateOrderRequest, CreateOrderResponse, CreateQuoteRequest, CreateQuoteResponse, GetOrderRequest, GetOrderResponse, ListOpenOrdersRequest, ListOpenOrdersResponse, ListOrderFillsRequest, ListOrderFillsResponse, ListPortfolioFillsRequest, ListPortfolioFillsResponse, ListPortfolioOrdersRequest, ListPortfolioOrdersResponse, } from './orders/types';
|
|
46
|
+
export type { GetPaymentMethodRequest, GetPaymentMethodResponse, ListEntityPaymentMethodsRequest, ListEntityPaymentMethodsResponse, } from './paymentMethods/types';
|
|
47
|
+
export type { ListPortfoliosRequest, ListPortfoliosResponse, GetPortfolioCreditRequest, GetPortfolioCreditResponse, GetPortfolioRequest, GetPortfolioResponse, } from './portfolios/types';
|
|
48
|
+
export type { ListAggregateEntityPositionsRequest, ListAggregateEntityPositionsResponse, ListEntityPositionsRequest, ListEntityPositionsResponse, } from './positions/types';
|
|
49
|
+
export type { ListProductsRequest, ListProductsResponse, } from './products/types';
|
|
50
|
+
export type { CreateConversionRequest, CreateConversionResponse, CreateOnchainTransactionRequest, CreateOnchainTransactionResponse, CreateTransferRequest, CreateTransferResponse, CreateWithdrawalRequest, CreateWithdrawalResponse, GetTransactionRequest, GetTransactionResponse, ListPortfolioTransactionsRequest, ListPortfolioTransactionsResponse, ListWalletTransactionsRequest, ListWalletTransactionsResponse, } from './transactions/types';
|
|
51
|
+
export type { ListPortfolioUsersRequest, ListPortfolioUsersResponse, ListUsersRequest, ListUsersResponse, } from './users/types';
|
|
52
|
+
export type { CreateWalletRequest, CreateWalletResponse, CreateWalletDepositAddressRequest, CreateWalletDepositAddressResponse, GetWalletDepositInstructionsRequest, GetWalletDepositInstructionsResponse, GetWalletRequest, GetWalletResponse, ListWalletAddressesRequest, ListWalletAddressesResponse, ListWalletsRequest, ListWalletsResponse, } from './wallets/types';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WalletsService = exports.UsersService = exports.TransactionsService = exports.ProductsService = exports.PortfoliosService = exports.PaymentMethodsService = exports.OrdersService = exports.OnchainAddressBookService = exports.InvoicesService = exports.FuturesService = exports.CommissionService = exports.BalancesService = exports.AssetsService = exports.AllocationService = exports.AddressBooksService = exports.ActivitiesService = exports.CoinbasePrimeCredentials = exports.CoinbasePrimeClient = void 0;
|
|
3
|
+
exports.WalletsService = exports.UsersService = exports.TransactionsService = exports.ProductsService = exports.PositionsService = exports.PortfoliosService = exports.PaymentMethodsService = exports.OrdersService = exports.OnchainAddressBookService = exports.InvoicesService = exports.FuturesService = exports.CommissionService = exports.BalancesService = exports.AssetsService = exports.AllocationService = exports.AddressBooksService = exports.ActivitiesService = exports.CoinbasePrimeCredentials = exports.CoinbasePrimeClient = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Copyright 2024-present Coinbase Global, Inc.
|
|
6
6
|
*
|
|
@@ -44,6 +44,8 @@ var paymentMethods_1 = require("./paymentMethods");
|
|
|
44
44
|
Object.defineProperty(exports, "PaymentMethodsService", { enumerable: true, get: function () { return paymentMethods_1.PaymentMethodsService; } });
|
|
45
45
|
var portfolios_1 = require("./portfolios");
|
|
46
46
|
Object.defineProperty(exports, "PortfoliosService", { enumerable: true, get: function () { return portfolios_1.PortfoliosService; } });
|
|
47
|
+
var positions_1 = require("./positions");
|
|
48
|
+
Object.defineProperty(exports, "PositionsService", { enumerable: true, get: function () { return positions_1.PositionsService; } });
|
|
47
49
|
var products_1 = require("./products");
|
|
48
50
|
Object.defineProperty(exports, "ProductsService", { enumerable: true, get: function () { return products_1.ProductsService; } });
|
|
49
51
|
var transactions_1 = require("./transactions");
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { Benchmark } from './enums/Benchmark';
|
|
21
|
+
import { LoanType } from './enums/LoanType';
|
|
22
|
+
import { RateType } from './enums/RateType';
|
|
23
|
+
export type Accrual = {
|
|
24
|
+
/**
|
|
25
|
+
* The accrual ID
|
|
26
|
+
*/
|
|
27
|
+
accrualId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The date of accrual in UTC
|
|
30
|
+
*/
|
|
31
|
+
date?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The unique ID of the portfolio
|
|
34
|
+
*/
|
|
35
|
+
portfolioId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The currency symbol
|
|
38
|
+
*/
|
|
39
|
+
symbol?: string;
|
|
40
|
+
loanType?: LoanType;
|
|
41
|
+
/**
|
|
42
|
+
* The daily or annualized interest rate for the loan, see rate_type
|
|
43
|
+
*/
|
|
44
|
+
interestRate?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Daily accrual amount in the principal currency
|
|
47
|
+
*/
|
|
48
|
+
nominalAccrual?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Daily USD accrued interest
|
|
51
|
+
*/
|
|
52
|
+
notionalAccrual?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Accrual rate used to convert from principal to USD accrual
|
|
55
|
+
*/
|
|
56
|
+
conversionRate?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Outstanding principal of the loan
|
|
59
|
+
*/
|
|
60
|
+
loanAmount?: string;
|
|
61
|
+
benchmark?: Benchmark;
|
|
62
|
+
/**
|
|
63
|
+
* Daily interest rate fetched from the benchmark source
|
|
64
|
+
*/
|
|
65
|
+
benchmarkRate?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Daily spread offset from the benchmark rate
|
|
68
|
+
*/
|
|
69
|
+
spread?: string;
|
|
70
|
+
rateType?: RateType;
|
|
71
|
+
/**
|
|
72
|
+
* Outstanding principal of the loan in USD
|
|
73
|
+
*/
|
|
74
|
+
loanAmountNotional?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Settled open borrow as of start-of-day in the principal currency
|
|
77
|
+
*/
|
|
78
|
+
nominalOpenBorrowSod?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Settled open borrow as of start-of-day in USD
|
|
81
|
+
*/
|
|
82
|
+
notionalOpenBorrowSod?: string;
|
|
83
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2025-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 });
|
|
@@ -20,8 +20,5 @@
|
|
|
20
20
|
export type AddressEntry = {
|
|
21
21
|
name?: string;
|
|
22
22
|
address?: string;
|
|
23
|
-
/**
|
|
24
|
-
* List of compatible chain IDs for a given address, empty for Solana. Ex: 1 for ETH Mainnet or 8453 for Base. Find more [here](https://chainlist.org/).
|
|
25
|
-
*/
|
|
26
23
|
chainIds?: Array<string>;
|
|
27
24
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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 AssetBalance = {
|
|
21
|
+
/**
|
|
22
|
+
* The unique ID of the portfolio
|
|
23
|
+
*/
|
|
24
|
+
portfolioId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The currency symbol
|
|
27
|
+
*/
|
|
28
|
+
symbol?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Balance amount
|
|
31
|
+
*/
|
|
32
|
+
amount?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Notional balance amount
|
|
35
|
+
*/
|
|
36
|
+
notionalAmount?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Conversion rate
|
|
39
|
+
*/
|
|
40
|
+
conversionRate?: string;
|
|
41
|
+
};
|