Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coinbase-api

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinbase-api - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

11

dist/cjs/CBExchangeClient.d.ts

@@ -130,3 +130,14 @@ import { AxiosRequestConfig } from 'axios';

/**
* Get all conversions
*
* Get all conversions associated with the profile tied to the API key used to make the request.
*/
getAllConversions(params: {
profile_id: string;
before?: string;
after?: string;
limit?: number;
}): Promise<any>;
/**
*
* Currencies Endpoints

@@ -133,0 +144,0 @@ *

@@ -162,3 +162,11 @@ "use strict";

/**
* Get all conversions
*
* Get all conversions associated with the profile tied to the API key used to make the request.
*/
getAllConversions(params) {
return this.getPrivate('/conversions', params);
}
/**
*
* Currencies Endpoints

@@ -165,0 +173,0 @@ *

@@ -258,2 +258,50 @@ import { AxiosRequestConfig } from 'axios';

/**
* List active loans for the portfolio
*
* Retrieves all loan info for a given portfolio.
*/
getActiveLoansForPortfolio(params: {
portfolio: string;
}): Promise<any>;
/**
* Get loan info for portfolio/asset
*
* Retrieves the loan info for a given portfolio and asset.
*/
getLoanInfoForPortfolioAsset(params: {
portfolio: string;
asset: string;
}): Promise<any>;
/**
* Acquire/repay loan
*
* Acquire or repay loan for a given portfolio and asset.
*/
acquireOrRepayLoan(params: {
portfolio: string;
asset: string;
amount: number;
action: 'ACQUIRE' | 'REPAY';
}): Promise<any>;
/**
* Preview loan update
*
* Preview acquire or repay loan for a given portfolio and asset.
*/
previewLoanUpdate(params: {
portfolio: string;
asset: string;
action: 'ACQUIRE' | 'REPAY';
amount: string;
}): Promise<any>;
/**
* View max loan availability
*
* View the maximum amount of loan that could be acquired now for a given portfolio and asset.
*/
getMaxLoanAvailability(params: {
portfolio: string;
asset: string;
}): Promise<any>;
/**
* List portfolio positions

@@ -260,0 +308,0 @@ *

@@ -297,2 +297,46 @@ "use strict";

/**
* List active loans for the portfolio
*
* Retrieves all loan info for a given portfolio.
*/
getActiveLoansForPortfolio(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans`);
}
/**
* Get loan info for portfolio/asset
*
* Retrieves the loan info for a given portfolio and asset.
*/
getLoanInfoForPortfolioAsset(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans/${params.asset}`);
}
/**
* Acquire/repay loan
*
* Acquire or repay loan for a given portfolio and asset.
*/
acquireOrRepayLoan(params) {
const { portfolio, asset, ...body } = params;
return this.postPrivate(`/api/v1/portfolios/${portfolio}/loans/${asset}`, {
body,
});
}
/**
* Preview loan update
*
* Preview acquire or repay loan for a given portfolio and asset.
*/
previewLoanUpdate(params) {
const { portfolio, asset, ...body } = params;
return this.postPrivate(`/api/v1/portfolios/${portfolio}/loans/${asset}/preview`, { body });
}
/**
* View max loan availability
*
* View the maximum amount of loan that could be acquired now for a given portfolio and asset.
*/
getMaxLoanAvailability(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans/${params.asset}/availability`);
}
/**
* List portfolio positions

@@ -299,0 +343,0 @@ *

1

dist/cjs/types/response/advanced-trade-client.d.ts

@@ -25,2 +25,3 @@ /**

retail_portfolio_id: string;
platform: string;
}

@@ -27,0 +28,0 @@ export interface AdvTradeAccountsList {

@@ -11,2 +11,3 @@ interface MarketMarketIOC {

base_size: string;
quote_size?: string;
limit_price: string;

@@ -17,2 +18,3 @@ post_only?: boolean;

base_size: string;
quote_size?: string;
limit_price: string;

@@ -23,2 +25,3 @@ end_time: string;

interface LimitLimitFOK {
quote_size?: string;
base_size: string;

@@ -25,0 +28,0 @@ limit_price: string;

@@ -130,3 +130,14 @@ import { AxiosRequestConfig } from 'axios';

/**
* Get all conversions
*
* Get all conversions associated with the profile tied to the API key used to make the request.
*/
getAllConversions(params: {
profile_id: string;
before?: string;
after?: string;
limit?: number;
}): Promise<any>;
/**
*
* Currencies Endpoints

@@ -133,0 +144,0 @@ *

@@ -159,3 +159,11 @@ import { BaseRestClient } from './lib/BaseRestClient.js';

/**
* Get all conversions
*
* Get all conversions associated with the profile tied to the API key used to make the request.
*/
getAllConversions(params) {
return this.getPrivate('/conversions', params);
}
/**
*
* Currencies Endpoints

@@ -162,0 +170,0 @@ *

@@ -258,2 +258,50 @@ import { AxiosRequestConfig } from 'axios';

/**
* List active loans for the portfolio
*
* Retrieves all loan info for a given portfolio.
*/
getActiveLoansForPortfolio(params: {
portfolio: string;
}): Promise<any>;
/**
* Get loan info for portfolio/asset
*
* Retrieves the loan info for a given portfolio and asset.
*/
getLoanInfoForPortfolioAsset(params: {
portfolio: string;
asset: string;
}): Promise<any>;
/**
* Acquire/repay loan
*
* Acquire or repay loan for a given portfolio and asset.
*/
acquireOrRepayLoan(params: {
portfolio: string;
asset: string;
amount: number;
action: 'ACQUIRE' | 'REPAY';
}): Promise<any>;
/**
* Preview loan update
*
* Preview acquire or repay loan for a given portfolio and asset.
*/
previewLoanUpdate(params: {
portfolio: string;
asset: string;
action: 'ACQUIRE' | 'REPAY';
amount: string;
}): Promise<any>;
/**
* View max loan availability
*
* View the maximum amount of loan that could be acquired now for a given portfolio and asset.
*/
getMaxLoanAvailability(params: {
portfolio: string;
asset: string;
}): Promise<any>;
/**
* List portfolio positions

@@ -260,0 +308,0 @@ *

@@ -294,2 +294,46 @@ import { BaseRestClient } from './lib/BaseRestClient.js';

/**
* List active loans for the portfolio
*
* Retrieves all loan info for a given portfolio.
*/
getActiveLoansForPortfolio(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans`);
}
/**
* Get loan info for portfolio/asset
*
* Retrieves the loan info for a given portfolio and asset.
*/
getLoanInfoForPortfolioAsset(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans/${params.asset}`);
}
/**
* Acquire/repay loan
*
* Acquire or repay loan for a given portfolio and asset.
*/
acquireOrRepayLoan(params) {
const { portfolio, asset, ...body } = params;
return this.postPrivate(`/api/v1/portfolios/${portfolio}/loans/${asset}`, {
body,
});
}
/**
* Preview loan update
*
* Preview acquire or repay loan for a given portfolio and asset.
*/
previewLoanUpdate(params) {
const { portfolio, asset, ...body } = params;
return this.postPrivate(`/api/v1/portfolios/${portfolio}/loans/${asset}/preview`, { body });
}
/**
* View max loan availability
*
* View the maximum amount of loan that could be acquired now for a given portfolio and asset.
*/
getMaxLoanAvailability(params) {
return this.getPrivate(`/api/v1/portfolios/${params.portfolio}/loans/${params.asset}/availability`);
}
/**
* List portfolio positions

@@ -296,0 +340,0 @@ *

@@ -25,2 +25,3 @@ /**

retail_portfolio_id: string;
platform: string;
}

@@ -27,0 +28,0 @@ export interface AdvTradeAccountsList {

@@ -11,2 +11,3 @@ interface MarketMarketIOC {

base_size: string;
quote_size?: string;
limit_price: string;

@@ -17,2 +18,3 @@ post_only?: boolean;

base_size: string;
quote_size?: string;
limit_price: string;

@@ -23,2 +25,3 @@ end_time: string;

interface LimitLimitFOK {
quote_size?: string;
base_size: string;

@@ -25,0 +28,0 @@ limit_price: string;

2

package.json
{
"name": "coinbase-api",
"version": "1.0.5",
"version": "1.0.6",
"description": "Node.js SDK for Coinbase's REST APIs and WebSockets, with TypeScript & strong end to end tests.",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc