diff --git a/README.md b/README.md index e55ba43..4770215 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Updated & performant JavaScript & Node.js SDK for the Coinbase REST APIs and Web - Issues? Check the [issues tab](https://github.com/tiagosiebler/coinbase-api/issues). - Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram. +- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/QuantSDKs) diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md index f37078d..a76bfc5 100644 --- a/docs/endpointFunctionList.md +++ b/docs/endpointFunctionList.md @@ -53,57 +53,57 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `getAccounts()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/accounts` | -| `getAccount()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/accounts/{account_id}` | -| `getBestBidAsk()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/best_bid_ask` | -| `getProductBook()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/product_book` | -| `getProducts()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/products` | -| `getProduct()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}` | -| `getProductCandles()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}/candles` | -| `getMarketTrades()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}/ticker` | -| `submitOrder()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders` | -| `cancelOrders()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/batch_cancel` | -| `updateOrder()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/edit` | -| `updateOrderPreview()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/edit_preview` | -| `getOrders()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/batch` | -| `getFills()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/fills` | -| `getOrder()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/{order_id}` | -| `previewOrder()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/preview` | -| `closePosition()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/close_position` | -| `getPortfolios()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/portfolios` | -| `createPortfolio()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/portfolios` | -| `movePortfolioFunds()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/portfolios/move_funds` | -| `getPortfolioBreakdown()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | -| `deletePortfolio()` | :closed_lock_with_key: | DELETE | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | -| `updatePortfolio()` | :closed_lock_with_key: | PUT | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | -| `getFuturesBalanceSummary()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/balance_summary` | -| `getIntradayMarginSetting()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/intraday/margin_setting` | -| `setIntradayMarginSetting()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/cfm/intraday/margin_setting` | -| `getCurrentMarginWindow()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/intraday/current_margin_window` | -| `getFuturesPositions()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/positions` | -| `getFuturesPosition()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/positions/{product_id}` | -| `scheduleFuturesSweep()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/cfm/sweeps/schedule` | -| `getFuturesSweeps()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/sweeps` | -| `cancelPendingFuturesSweep()` | :closed_lock_with_key: | DELETE | `/api/v3/brokerage/cfm/sweeps` | -| `allocatePortfolio()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/intx/allocate` | -| `getPerpetualsPortfolioSummary()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/portfolio/{portfolio_uuid}` | -| `getPerpetualsPositions()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/positions/{portfolio_uuid}` | -| `getPerpetualsPosition()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol}` | -| `getPortfoliosBalances()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/balances/{portfolio_uuid}` | -| `updateMultiAssetCollateral()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/intx/multi_asset_collateral` | -| `getTransactionSummary()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/transaction_summary` | -| `submitConvertQuote()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/convert/quote` | -| `getConvertTrade()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/convert/trade/{trade_id}` | -| `commitConvertTrade()` | :closed_lock_with_key: | POST | `/api/v3/brokerage/convert/trade/{trade_id}` | -| `getServerTime()` | | GET | `/api/v3/brokerage/time` | -| `getPublicProductBook()` | | GET | `/api/v3/brokerage/market/product_book` | -| `getPublicProducts()` | | GET | `/api/v3/brokerage/market/products` | -| `getPublicProduct()` | | GET | `/api/v3/brokerage/market/products/{product_id}` | -| `getPublicProductCandles()` | | GET | `/api/v3/brokerage/market/products/{product_id}/candles` | -| `getPublicMarketTrades()` | | GET | `/api/v3/brokerage/market/products/{product_id}/ticker` | -| `getPaymentMethods()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/payment_methods` | -| `getPaymentMethod()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/payment_methods/{payment_method_id}` | -| `getApiKeyPermissions()` | :closed_lock_with_key: | GET | `/api/v3/brokerage/key_permissions` | +| [getAccounts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L85) | :closed_lock_with_key: | GET | `/api/v3/brokerage/accounts` | +| [getAccount()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L99) | :closed_lock_with_key: | GET | `/api/v3/brokerage/accounts/{account_id}` | +| [getBestBidAsk()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L116) | :closed_lock_with_key: | GET | `/api/v3/brokerage/best_bid_ask` | +| [getProductBook()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L127) | :closed_lock_with_key: | GET | `/api/v3/brokerage/product_book` | +| [getProducts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L141) | :closed_lock_with_key: | GET | `/api/v3/brokerage/products` | +| [getProduct()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L153) | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}` | +| [getProductCandles()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L169) | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}/candles` | +| [getMarketTrades()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L184) | :closed_lock_with_key: | GET | `/api/v3/brokerage/products/{product_id}/ticker` | +| [submitOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L206) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders` | +| [cancelOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L223) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/batch_cancel` | +| [updateOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L240) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/edit` | +| [updateOrderPreview()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L256) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/edit_preview` | +| [getOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L276) | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/batch` | +| [getFills()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L291) | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/fills` | +| [getOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L303) | :closed_lock_with_key: | GET | `/api/v3/brokerage/orders/historical/{order_id}` | +| [previewOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L321) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/preview` | +| [closePosition()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L335) | :closed_lock_with_key: | POST | `/api/v3/brokerage/orders/close_position` | +| [getPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L355) | :closed_lock_with_key: | GET | `/api/v3/brokerage/portfolios` | +| [createPortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L368) | :closed_lock_with_key: | POST | `/api/v3/brokerage/portfolios` | +| [movePortfolioFunds()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L381) | :closed_lock_with_key: | POST | `/api/v3/brokerage/portfolios/move_funds` | +| [getPortfolioBreakdown()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L395) | :closed_lock_with_key: | GET | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | +| [deletePortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L411) | :closed_lock_with_key: | DELETE | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | +| [updatePortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L422) | :closed_lock_with_key: | PUT | `/api/v3/brokerage/portfolios/{portfolio_uuid}` | +| [getFuturesBalanceSummary()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L453) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/balance_summary` | +| [getIntradayMarginSetting()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L464) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/intraday/margin_setting` | +| [setIntradayMarginSetting()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L478) | :closed_lock_with_key: | POST | `/api/v3/brokerage/cfm/intraday/margin_setting` | +| [getCurrentMarginWindow()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L494) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/intraday/current_margin_window` | +| [getFuturesPositions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L511) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/positions` | +| [getFuturesPosition()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L520) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/positions/{product_id}` | +| [scheduleFuturesSweep()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L540) | :closed_lock_with_key: | POST | `/api/v3/brokerage/cfm/sweeps/schedule` | +| [getFuturesSweeps()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L558) | :closed_lock_with_key: | GET | `/api/v3/brokerage/cfm/sweeps` | +| [cancelPendingFuturesSweep()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L567) | :closed_lock_with_key: | DELETE | `/api/v3/brokerage/cfm/sweeps` | +| [allocatePortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L583) | :closed_lock_with_key: | POST | `/api/v3/brokerage/intx/allocate` | +| [getPerpetualsPortfolioSummary()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L594) | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/portfolio/{portfolio_uuid}` | +| [getPerpetualsPositions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L608) | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/positions/{portfolio_uuid}` | +| [getPerpetualsPosition()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L623) | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol}` | +| [getPortfoliosBalances()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L638) | :closed_lock_with_key: | GET | `/api/v3/brokerage/intx/balances/{portfolio_uuid}` | +| [updateMultiAssetCollateral()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L650) | :closed_lock_with_key: | POST | `/api/v3/brokerage/intx/multi_asset_collateral` | +| [getTransactionSummary()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L670) | :closed_lock_with_key: | GET | `/api/v3/brokerage/transaction_summary` | +| [submitConvertQuote()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L688) | :closed_lock_with_key: | POST | `/api/v3/brokerage/convert/quote` | +| [getConvertTrade()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L699) | :closed_lock_with_key: | GET | `/api/v3/brokerage/convert/trade/{trade_id}` | +| [commitConvertTrade()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L716) | :closed_lock_with_key: | POST | `/api/v3/brokerage/convert/trade/{trade_id}` | +| [getServerTime()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L733) | | GET | `/api/v3/brokerage/time` | +| [getPublicProductBook()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L746) | | GET | `/api/v3/brokerage/market/product_book` | +| [getPublicProducts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L759) | | GET | `/api/v3/brokerage/market/products` | +| [getPublicProduct()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L771) | | GET | `/api/v3/brokerage/market/products/{product_id}` | +| [getPublicProductCandles()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L783) | | GET | `/api/v3/brokerage/market/products/{product_id}/candles` | +| [getPublicMarketTrades()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L798) | | GET | `/api/v3/brokerage/market/products/{product_id}/ticker` | +| [getPaymentMethods()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L819) | :closed_lock_with_key: | GET | `/api/v3/brokerage/payment_methods` | +| [getPaymentMethod()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L830) | :closed_lock_with_key: | GET | `/api/v3/brokerage/payment_methods/{payment_method_id}` | +| [getApiKeyPermissions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L850) | :closed_lock_with_key: | GET | `/api/v3/brokerage/key_permissions` | # CBAppClient.ts @@ -111,31 +111,31 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `getAccounts()` | :closed_lock_with_key: | GET | `/v2/accounts` | -| `getAccount()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}` | -| `createAddress()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/addresses` | -| `getAddresses()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses` | -| `getAddress()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses/{addressId}` | -| `getAddressTransactions()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses/{addressId}/transactions` | -| `sendMoney()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/transactions` | -| `transferMoney()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/transactions` | -| `getTransactions()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/transactions` | -| `getTransaction()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/transactions/{transactionId}` | -| `depositFunds()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/deposits` | -| `commitDeposit()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/deposits/{deposit_id}/commit` | -| `getDeposits()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/deposits` | -| `getDeposit()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/deposits/{deposit_id}` | -| `withdrawFunds()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/withdrawals` | -| `commitWithdrawal()` | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/withdrawals/{withdrawal_id}/commit` | -| `getWithdrawals()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/withdrawals` | -| `getWithdrawal()` | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/withdrawals/{withdrawal_id}` | -| `getFiatCurrencies()` | | GET | `/v2/currencies` | -| `getCryptocurrencies()` | | GET | `/v2/currencies/crypto` | -| `getExchangeRates()` | | GET | `/v2/exchange-rates` | -| `getBuyPrice()` | | GET | `/v2/prices/{currencyPair}/buy` | -| `getSellPrice()` | | GET | `/v2/prices/{currencyPair}/sell` | -| `getSpotPrice()` | | GET | `/v2/prices/{currencyPair}/spot` | -| `getCurrentTime()` | | GET | `/v2/time` | +| [getAccounts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L64) | :closed_lock_with_key: | GET | `/v2/accounts` | +| [getAccount()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L79) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}` | +| [createAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L96) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/addresses` | +| [getAddresses()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L112) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses` | +| [getAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L133) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses/{addressId}` | +| [getAddressTransactions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L150) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/addresses/{addressId}/transactions` | +| [sendMoney()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L178) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/transactions` | +| [transferMoney()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L193) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/transactions` | +| [getTransactions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L210) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/transactions` | +| [getTransaction()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L228) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/transactions/{transactionId}` | +| [depositFunds()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L250) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/deposits` | +| [commitDeposit()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L264) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/deposits/{deposit_id}/commit` | +| [getDeposits()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L281) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/deposits` | +| [getDeposit()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L296) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/deposits/{deposit_id}` | +| [withdrawFunds()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L315) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/withdrawals` | +| [commitWithdrawal()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L329) | :closed_lock_with_key: | POST | `/v2/accounts/{account_id}/withdrawals/{withdrawal_id}/commit` | +| [getWithdrawals()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L346) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/withdrawals` | +| [getWithdrawal()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L364) | :closed_lock_with_key: | GET | `/v2/accounts/{account_id}/withdrawals/{withdrawal_id}` | +| [getFiatCurrencies()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L387) | | GET | `/v2/currencies` | +| [getCryptocurrencies()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L398) | | GET | `/v2/currencies/crypto` | +| [getExchangeRates()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L414) | | GET | `/v2/exchange-rates` | +| [getBuyPrice()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L435) | | GET | `/v2/prices/{currencyPair}/buy` | +| [getSellPrice()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L450) | | GET | `/v2/prices/{currencyPair}/sell` | +| [getSpotPrice()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L465) | | GET | `/v2/prices/{currencyPair}/spot` | +| [getCurrentTime()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L487) | | GET | `/v2/time` | # CBExchangeClient.ts @@ -143,80 +143,80 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `getAccounts()` | :closed_lock_with_key: | GET | `/accounts` | -| `getAccount()` | :closed_lock_with_key: | GET | `/accounts/{account_id}` | -| `getAccountHolds()` | :closed_lock_with_key: | GET | `/accounts/{account_id}/holds` | -| `getAccountLedger()` | :closed_lock_with_key: | GET | `/accounts/{account_id}/ledger` | -| `getAccountTransfers()` | :closed_lock_with_key: | GET | `/accounts/{account_id}/transfers` | -| `getAddressBook()` | :closed_lock_with_key: | GET | `/address-book` | -| `addAddresses()` | :closed_lock_with_key: | POST | `/address-book` | -| `deleteAddress()` | :closed_lock_with_key: | DELETE | `/address-book/{id}` | -| `getCoinbaseWallets()` | :closed_lock_with_key: | GET | `/coinbase-accounts` | -| `createNewCryptoAddress()` | :closed_lock_with_key: | POST | `/coinbase-accounts/{account_id}/addresses` | -| `convertCurrency()` | :closed_lock_with_key: | POST | `/conversions` | -| `getConversionFeeRates()` | :closed_lock_with_key: | GET | `/conversions/fees` | -| `getConversion()` | :closed_lock_with_key: | GET | `/conversions/{conversion_id}` | -| `getCurrencies()` | | GET | `/currencies` | -| `getCurrency()` | | GET | `/currencies/{currency_id}` | -| `depositFromCoinbaseAccount()` | :closed_lock_with_key: | POST | `/deposits/coinbase-account` | -| `depositFromPaymentMethod()` | :closed_lock_with_key: | POST | `/deposits/payment-method` | -| `getPaymentMethods()` | :closed_lock_with_key: | GET | `/payment-methods` | -| `getTransfers()` | :closed_lock_with_key: | GET | `/transfers` | -| `getTransfer()` | :closed_lock_with_key: | GET | `/transfers/{transfer_id}` | -| `submitTravelInformation()` | :closed_lock_with_key: | POST | `/transfers/{transfer_id}/travel-rules` | -| `withdrawToCoinbaseAccount()` | :closed_lock_with_key: | POST | `/withdrawals/coinbase-account` | -| `withdrawToCryptoAddress()` | :closed_lock_with_key: | POST | `/withdrawals/crypto` | -| `getCryptoWithdrawalFeeEstimate()` | :closed_lock_with_key: | GET | `/withdrawals/fee-estimate` | -| `withdrawToPaymentMethod()` | :closed_lock_with_key: | POST | `/withdrawals/payment-method` | -| `getFees()` | :closed_lock_with_key: | GET | `/fees` | -| `getFills()` | :closed_lock_with_key: | GET | `/fills` | -| `getOrders()` | :closed_lock_with_key: | GET | `/orders` | -| `cancelAllOrders()` | :closed_lock_with_key: | DELETE | `/orders` | -| `submitOrder()` | :closed_lock_with_key: | POST | `/orders` | -| `getOrder()` | :closed_lock_with_key: | GET | `/orders/{order_id}` | -| `cancelOrder()` | :closed_lock_with_key: | DELETE | `/orders/{order_id}` | -| `getLoans()` | :closed_lock_with_key: | GET | `/loans` | -| `getLoanAssets()` | :closed_lock_with_key: | GET | `/loans/assets` | -| `getInterestSummaries()` | :closed_lock_with_key: | GET | `/loans/interest` | -| `getInterestRateHistory()` | :closed_lock_with_key: | GET | `/loans/interest/history/{loan_id}` | -| `getInterestCharges()` | :closed_lock_with_key: | GET | `/loans/interest/{loan_id}` | -| `getLendingOverview()` | :closed_lock_with_key: | GET | `/loans/lending-overview` | -| `getNewLoanPreview()` | :closed_lock_with_key: | GET | `/loans/loan-preview` | -| `submitNewLoan()` | :closed_lock_with_key: | POST | `/loans/open` | -| `getNewLoanOptions()` | :closed_lock_with_key: | GET | `/loans/options` | -| `repayLoanInterest()` | :closed_lock_with_key: | POST | `/loans/repay-interest` | -| `repayLoanPrincipal()` | :closed_lock_with_key: | POST | `/loans/repay-principal` | -| `getPrincipalRepaymentPreview()` | :closed_lock_with_key: | GET | `/loans/repayment-preview` | -| `getSignedPrices()` | :closed_lock_with_key: | GET | `/oracle` | -| `getAllTradingPairs()` | | GET | `/products` | -| `getAllProductVolume()` | | GET | `/products/volume-summary` | -| `getProduct()` | | GET | `/products/{product_id}` | -| `getProductBook()` | | GET | `/products/{product_id}/book` | -| `getProductCandles()` | | GET | `/products/{product_id}/candles` | -| `getProductStats()` | | GET | `/products/{product_id}/stats` | -| `getProductTicker()` | | GET | `/products/{product_id}/ticker` | -| `getProductTrades()` | | GET | `/products/{product_id}/trades` | -| `getProfiles()` | :closed_lock_with_key: | GET | `/profiles` | -| `createProfile()` | :closed_lock_with_key: | POST | `/profiles` | -| `transferFundsBetweenProfiles()` | :closed_lock_with_key: | POST | `/profiles/transfer` | -| `getProfileById()` | :closed_lock_with_key: | GET | `/profiles/{profile_id}` | -| `renameProfile()` | :closed_lock_with_key: | PUT | `/profiles/{profile_id}` | -| `deleteProfile()` | :closed_lock_with_key: | PUT | `/profiles/{profile_id}/deactivate` | -| `getAllReports()` | :closed_lock_with_key: | GET | `/reports` | -| `createReport()` | :closed_lock_with_key: | POST | `/reports` | -| `getReport()` | :closed_lock_with_key: | GET | `/reports/{report_id}` | -| `getTravelRuleInformation()` | :closed_lock_with_key: | GET | `/travel-rules` | -| `createTravelRuleEntry()` | :closed_lock_with_key: | POST | `/travel-rules` | -| `deleteTravelRuleEntry()` | :closed_lock_with_key: | DELETE | `/travel-rules/{id}` | -| `getUserExchangeLimits()` | :closed_lock_with_key: | GET | `/users/{user_id}/exchange-limits` | -| `updateSettlementPreference()` | :closed_lock_with_key: | POST | `/users/{user_id}/settlement-preferences` | -| `getUserTradingVolume()` | :closed_lock_with_key: | GET | `/users/{user_id}/trading-volumes` | -| `getAllWrappedAssets()` | | GET | `/wrapped-assets` | -| `getAllStakeWraps()` | :closed_lock_with_key: | GET | `/wrapped-assets/stake-wrap` | -| `createStakeWrap()` | :closed_lock_with_key: | POST | `/wrapped-assets/stake-wrap` | -| `getStakeWrap()` | :closed_lock_with_key: | GET | `/wrapped-assets/stake-wrap/{stake_wrap_id}` | -| `getWrappedAssetDetails()` | :closed_lock_with_key: | GET | `/wrapped-assets/{wrapped_asset_id}` | -| `getWrappedAssetConversionRate()` | :closed_lock_with_key: | GET | `/wrapped-assets/{wrapped_asset_id}/conversion-rate` | +| [getAccounts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L70) | :closed_lock_with_key: | GET | `/accounts` | +| [getAccount()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L79) | :closed_lock_with_key: | GET | `/accounts/{account_id}` | +| [getAccountHolds()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L90) | :closed_lock_with_key: | GET | `/accounts/{account_id}/holds` | +| [getAccountLedger()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L109) | :closed_lock_with_key: | GET | `/accounts/{account_id}/ledger` | +| [getAccountTransfers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L119) | :closed_lock_with_key: | GET | `/accounts/{account_id}/transfers` | +| [getAddressBook()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L135) | :closed_lock_with_key: | GET | `/address-book` | +| [addAddresses()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L144) | :closed_lock_with_key: | POST | `/address-book` | +| [deleteAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L153) | :closed_lock_with_key: | DELETE | `/address-book/{id}` | +| [getCoinbaseWallets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L168) | :closed_lock_with_key: | GET | `/coinbase-accounts` | +| [createNewCryptoAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L177) | :closed_lock_with_key: | POST | `/coinbase-accounts/{account_id}/addresses` | +| [convertCurrency()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L195) | :closed_lock_with_key: | POST | `/conversions` | +| [getConversionFeeRates()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L204) | :closed_lock_with_key: | GET | `/conversions/fees` | +| [getConversion()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L213) | :closed_lock_with_key: | GET | `/conversions/{conversion_id}` | +| [getCurrencies()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L232) | | GET | `/currencies` | +| [getCurrency()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L241) | | GET | `/currencies/{currency_id}` | +| [depositFromCoinbaseAccount()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L256) | :closed_lock_with_key: | POST | `/deposits/coinbase-account` | +| [depositFromPaymentMethod()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L270) | :closed_lock_with_key: | POST | `/deposits/payment-method` | +| [getPaymentMethods()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L281) | :closed_lock_with_key: | GET | `/payment-methods` | +| [getTransfers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L290) | :closed_lock_with_key: | GET | `/transfers` | +| [getTransfer()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L299) | :closed_lock_with_key: | GET | `/transfers/{transfer_id}` | +| [submitTravelInformation()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L308) | :closed_lock_with_key: | POST | `/transfers/{transfer_id}/travel-rules` | +| [withdrawToCoinbaseAccount()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L322) | :closed_lock_with_key: | POST | `/withdrawals/coinbase-account` | +| [withdrawToCryptoAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L331) | :closed_lock_with_key: | POST | `/withdrawals/crypto` | +| [getCryptoWithdrawalFeeEstimate()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L340) | :closed_lock_with_key: | GET | `/withdrawals/fee-estimate` | +| [withdrawToPaymentMethod()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L352) | :closed_lock_with_key: | POST | `/withdrawals/payment-method` | +| [getFees()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L368) | :closed_lock_with_key: | GET | `/fees` | +| [getFills()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L383) | :closed_lock_with_key: | GET | `/fills` | +| [getOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L393) | :closed_lock_with_key: | GET | `/orders` | +| [cancelAllOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L402) | :closed_lock_with_key: | DELETE | `/orders` | +| [submitOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L415) | :closed_lock_with_key: | POST | `/orders` | +| [getOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L425) | :closed_lock_with_key: | GET | `/orders/{order_id}` | +| [cancelOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L435) | :closed_lock_with_key: | DELETE | `/orders/{order_id}` | +| [getLoans()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L453) | :closed_lock_with_key: | GET | `/loans` | +| [getLoanAssets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L462) | :closed_lock_with_key: | GET | `/loans/assets` | +| [getInterestSummaries()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L471) | :closed_lock_with_key: | GET | `/loans/interest` | +| [getInterestRateHistory()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L480) | :closed_lock_with_key: | GET | `/loans/interest/history/{loan_id}` | +| [getInterestCharges()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L489) | :closed_lock_with_key: | GET | `/loans/interest/{loan_id}` | +| [getLendingOverview()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L501) | :closed_lock_with_key: | GET | `/loans/lending-overview` | +| [getNewLoanPreview()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L512) | :closed_lock_with_key: | GET | `/loans/loan-preview` | +| [submitNewLoan()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L525) | :closed_lock_with_key: | POST | `/loans/open` | +| [getNewLoanOptions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L534) | :closed_lock_with_key: | GET | `/loans/options` | +| [repayLoanInterest()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L543) | :closed_lock_with_key: | POST | `/loans/repay-interest` | +| [repayLoanPrincipal()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L552) | :closed_lock_with_key: | POST | `/loans/repay-principal` | +| [getPrincipalRepaymentPreview()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L562) | :closed_lock_with_key: | GET | `/loans/repayment-preview` | +| [getSignedPrices()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L579) | :closed_lock_with_key: | GET | `/oracle` | +| [getAllTradingPairs()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L594) | | GET | `/products` | +| [getAllProductVolume()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L603) | | GET | `/products/volume-summary` | +| [getProduct()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L612) | | GET | `/products/{product_id}` | +| [getProductBook()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L623) | | GET | `/products/{product_id}/book` | +| [getProductCandles()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L634) | | GET | `/products/{product_id}/candles` | +| [getProductStats()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L644) | | GET | `/products/{product_id}/stats` | +| [getProductTicker()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L653) | | GET | `/products/{product_id}/ticker` | +| [getProductTrades()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L662) | | GET | `/products/{product_id}/trades` | +| [getProfiles()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L678) | :closed_lock_with_key: | GET | `/profiles` | +| [createProfile()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L687) | :closed_lock_with_key: | POST | `/profiles` | +| [transferFundsBetweenProfiles()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L696) | :closed_lock_with_key: | POST | `/profiles/transfer` | +| [getProfileById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L707) | :closed_lock_with_key: | GET | `/profiles/{profile_id}` | +| [renameProfile()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L720) | :closed_lock_with_key: | PUT | `/profiles/{profile_id}` | +| [deleteProfile()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L731) | :closed_lock_with_key: | PUT | `/profiles/{profile_id}/deactivate` | +| [getAllReports()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L749) | :closed_lock_with_key: | GET | `/reports` | +| [createReport()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L759) | :closed_lock_with_key: | POST | `/reports` | +| [getReport()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L768) | :closed_lock_with_key: | GET | `/reports/{report_id}` | +| [getTravelRuleInformation()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L783) | :closed_lock_with_key: | GET | `/travel-rules` | +| [createTravelRuleEntry()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L794) | :closed_lock_with_key: | POST | `/travel-rules` | +| [deleteTravelRuleEntry()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L807) | :closed_lock_with_key: | DELETE | `/travel-rules/{id}` | +| [getUserExchangeLimits()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L822) | :closed_lock_with_key: | GET | `/users/{user_id}/exchange-limits` | +| [updateSettlementPreference()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L831) | :closed_lock_with_key: | POST | `/users/{user_id}/settlement-preferences` | +| [getUserTradingVolume()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L846) | :closed_lock_with_key: | GET | `/users/{user_id}/trading-volumes` | +| [getAllWrappedAssets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L861) | | GET | `/wrapped-assets` | +| [getAllStakeWraps()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L870) | :closed_lock_with_key: | GET | `/wrapped-assets/stake-wrap` | +| [createStakeWrap()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L879) | :closed_lock_with_key: | POST | `/wrapped-assets/stake-wrap` | +| [getStakeWrap()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L892) | :closed_lock_with_key: | GET | `/wrapped-assets/stake-wrap/{stake_wrap_id}` | +| [getWrappedAssetDetails()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L903) | :closed_lock_with_key: | GET | `/wrapped-assets/{wrapped_asset_id}` | +| [getWrappedAssetConversionRate()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L912) | :closed_lock_with_key: | GET | `/wrapped-assets/{wrapped_asset_id}/conversion-rate` | # CBInternationalClient.ts @@ -224,50 +224,50 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `getAssets()` | | GET | `/api/v1/assets` | -| `getAssetDetails()` | | GET | `/api/v1/assets/{asset}` | -| `getSupportedNetworksPerAsset()` | | GET | `/api/v1/assets/{asset}/networks` | -| `getInstruments()` | | GET | `/api/v1/instruments` | -| `getInstrumentDetails()` | | GET | `/api/v1/instruments/{instrument}` | -| `getQuotePerInstrument()` | | GET | `/api/v1/instruments/{instrument}/quote` | -| `getDailyTradingVolumes()` | | GET | `/api/v1/instruments/volumes/daily` | -| `getAggregatedCandlesData()` | | GET | `/api/v1/instruments/{instrument}/candles` | -| `getHistoricalFundingRates()` | | GET | `/api/v1/instruments/{instrument}/funding` | -| `getPositionOffsets()` | | GET | `/api/v1/position-offsets` | -| `submitOrder()` | :closed_lock_with_key: | POST | `/api/v1/orders` | -| `getOpenOrders()` | :closed_lock_with_key: | GET | `/api/v1/orders` | -| `cancelOrders()` | :closed_lock_with_key: | DELETE | `/api/v1/orders` | -| `updateOpenOrder()` | :closed_lock_with_key: | PUT | `/api/v1/orders/{id}` | -| `getOrderDetails()` | :closed_lock_with_key: | GET | `/api/v1/orders/{id}` | -| `cancelOrder()` | :closed_lock_with_key: | DELETE | `/api/v1/orders/{id}` | -| `getUserPortfolios()` | :closed_lock_with_key: | GET | `/api/v1/portfolios` | -| `createPortfolio()` | :closed_lock_with_key: | POST | `/api/v1/portfolios` | -| `updatePortfolioParameters()` | :closed_lock_with_key: | PATCH | `/api/v1/portfolios` | -| `getUserPortfolio()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}` | -| `updatePortfolio()` | :closed_lock_with_key: | PUT | `/api/v1/portfolios/{portfolio}` | -| `getPortfolioDetails()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/detail` | -| `getPortfolioSummary()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/summary` | -| `getPortfolioBalances()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/balances` | -| `getBalanceForPortfolioAsset()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/balances/{asset}` | -| `getPortfolioPositions()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/positions` | -| `getPositionForPortfolioInstrument()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/positions/{instrument}` | -| `getFillsByPortfolios()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/fills` | -| `getPortfolioFills()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/fills` | -| `setCrossCollateral()` | :closed_lock_with_key: | POST | `/api/v1/portfolios/{portfolio}/cross-collateral-enabled` | -| `setAutoMargin()` | :closed_lock_with_key: | POST | `/api/v1/portfolios/{portfolio}/auto-margin-enabled` | -| `setPortfolioMarginOverride()` | :closed_lock_with_key: | POST | `/api/v1/portfolios/margin` | -| `transferFundsBetweenPortfolios()` | :closed_lock_with_key: | POST | `/api/v1/portfolios/transfer` | -| `transferPositionsBetweenPortfolios()` | :closed_lock_with_key: | POST | `/api/v1/portfolios/transfer-position` | -| `getPortfolioFeeRates()` | :closed_lock_with_key: | GET | `/api/v1/portfolios/fee-rates` | -| `getRankings()` | :closed_lock_with_key: | GET | `/api/v1/rankings/statistics` | -| `getMatchingTransfers()` | :closed_lock_with_key: | GET | `/api/v1/transfers` | -| `getTransfer()` | :closed_lock_with_key: | GET | `/api/v1/transfers/{transfer_uuid}` | -| `withdrawToCryptoAddress()` | :closed_lock_with_key: | POST | `/api/v1/transfers/withdraw` | -| `createCryptoAddress()` | :closed_lock_with_key: | POST | `/api/v1/transfers/address` | -| `createCounterpartyId()` | :closed_lock_with_key: | POST | `/api/v1/transfers/create-counterparty-id` | -| `validateCounterpartyId()` | :closed_lock_with_key: | POST | `/api/v1/transfers/validate-counterparty-id` | -| `withdrawToCounterpartyId()` | :closed_lock_with_key: | POST | `/api/v1/transfers/withdraw/counterparty` | -| `getFeeRateTiers()` | :closed_lock_with_key: | GET | `/api/v1/fee-rate-tiers` | +| [getAssets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L54) | | GET | `/api/v1/assets` | +| [getAssetDetails()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L63) | | GET | `/api/v1/assets/{asset}` | +| [getSupportedNetworksPerAsset()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L72) | | GET | `/api/v1/assets/{asset}/networks` | +| [getInstruments()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L87) | | GET | `/api/v1/instruments` | +| [getInstrumentDetails()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L96) | | GET | `/api/v1/instruments/{instrument}` | +| [getQuotePerInstrument()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L105) | | GET | `/api/v1/instruments/{instrument}/quote` | +| [getDailyTradingVolumes()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L114) | | GET | `/api/v1/instruments/volumes/daily` | +| [getAggregatedCandlesData()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L123) | | GET | `/api/v1/instruments/{instrument}/candles` | +| [getHistoricalFundingRates()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L133) | | GET | `/api/v1/instruments/{instrument}/funding` | +| [getPositionOffsets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L153) | | GET | `/api/v1/position-offsets` | +| [submitOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L168) | :closed_lock_with_key: | POST | `/api/v1/orders` | +| [getOpenOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L179) | :closed_lock_with_key: | GET | `/api/v1/orders` | +| [cancelOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L188) | :closed_lock_with_key: | DELETE | `/api/v1/orders` | +| [updateOpenOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L199) | :closed_lock_with_key: | PUT | `/api/v1/orders/{id}` | +| [getOrderDetails()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L209) | :closed_lock_with_key: | GET | `/api/v1/orders/{id}` | +| [cancelOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L219) | :closed_lock_with_key: | DELETE | `/api/v1/orders/{id}` | +| [getUserPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L237) | :closed_lock_with_key: | GET | `/api/v1/portfolios` | +| [createPortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L246) | :closed_lock_with_key: | POST | `/api/v1/portfolios` | +| [updatePortfolioParameters()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L255) | :closed_lock_with_key: | PATCH | `/api/v1/portfolios` | +| [getUserPortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L266) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}` | +| [updatePortfolio()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L275) | :closed_lock_with_key: | PUT | `/api/v1/portfolios/{portfolio}` | +| [getPortfolioDetails()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L285) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/detail` | +| [getPortfolioSummary()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L294) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/summary` | +| [getPortfolioBalances()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L303) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/balances` | +| [getBalanceForPortfolioAsset()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L312) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/balances/{asset}` | +| [getPortfolioPositions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L326) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/positions` | +| [getPositionForPortfolioInstrument()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L335) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/positions/{instrument}` | +| [getFillsByPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L349) | :closed_lock_with_key: | GET | `/api/v1/portfolios/fills` | +| [getPortfolioFills()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L358) | :closed_lock_with_key: | GET | `/api/v1/portfolios/{portfolio}/fills` | +| [setCrossCollateral()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L368) | :closed_lock_with_key: | POST | `/api/v1/portfolios/{portfolio}/cross-collateral-enabled` | +| [setAutoMargin()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L385) | :closed_lock_with_key: | POST | `/api/v1/portfolios/{portfolio}/auto-margin-enabled` | +| [setPortfolioMarginOverride()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L398) | :closed_lock_with_key: | POST | `/api/v1/portfolios/margin` | +| [transferFundsBetweenPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L410) | :closed_lock_with_key: | POST | `/api/v1/portfolios/transfer` | +| [transferPositionsBetweenPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L422) | :closed_lock_with_key: | POST | `/api/v1/portfolios/transfer-position` | +| [getPortfolioFeeRates()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L435) | :closed_lock_with_key: | GET | `/api/v1/portfolios/fee-rates` | +| [getRankings()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L449) | :closed_lock_with_key: | GET | `/api/v1/rankings/statistics` | +| [getMatchingTransfers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L468) | :closed_lock_with_key: | GET | `/api/v1/transfers` | +| [getTransfer()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L477) | :closed_lock_with_key: | GET | `/api/v1/transfers/{transfer_uuid}` | +| [withdrawToCryptoAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L486) | :closed_lock_with_key: | POST | `/api/v1/transfers/withdraw` | +| [createCryptoAddress()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L497) | :closed_lock_with_key: | POST | `/api/v1/transfers/address` | +| [createCounterpartyId()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L510) | :closed_lock_with_key: | POST | `/api/v1/transfers/create-counterparty-id` | +| [validateCounterpartyId()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L521) | :closed_lock_with_key: | POST | `/api/v1/transfers/validate-counterparty-id` | +| [withdrawToCounterpartyId()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L532) | :closed_lock_with_key: | POST | `/api/v1/transfers/withdraw/counterparty` | +| [getFeeRateTiers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L550) | :closed_lock_with_key: | GET | `/api/v1/fee-rate-tiers` | # CBPrimeClient.ts @@ -275,46 +275,46 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `createPortfolioAllocations()` | :closed_lock_with_key: | POST | `/v1/allocations` | -| `createPortfolioNetAllocations()` | :closed_lock_with_key: | POST | `/v1/allocations/net` | -| `getPortfolioAllocations()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations` | -| `getAllocationById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations/{allocation_id}` | -| `getNetAllocationsByNettingId()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations/net/{netting_id}` | -| `getInvoices()` | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/invoices` | -| `getAssets()` | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/assets` | -| `getEntityPaymentMethods()` | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/payment-methods` | -| `getEntityPaymentMethod()` | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/payment-methods/{payment_method_id}` | -| `getUsers()` | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/users` | -| `getPortfolioUsers()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/users` | -| `getPortfolios()` | :closed_lock_with_key: | GET | `/v1/portfolios` | -| `getPortfolioById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}` | -| `getPortfolioCreditInformation()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/credit` | -| `getActivities()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/activities` | -| `getActivityById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/activities/{activity_id}` | -| `getAddressBook()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/address_book` | -| `createAddressBookEntry()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/address_book` | -| `getPortfolioBalances()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/balances` | -| `getWalletBalance()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance` | -| `getWeb3WalletBalances()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances` | -| `getPortfolioCommission()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/commission` | -| `getOpenOrders()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/open_orders` | -| `submitOrder()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/order` | -| `getOrderPreview()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/order_preview` | -| `getPortfolioOrders()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders` | -| `getOrderById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders/{order_id}` | -| `cancelOrder()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/orders/{order_id}/cancel` | -| `getOrderFills()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders/{order_id}/fills` | -| `getPortfolioProducts()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/products` | -| `getPortfolioTransactions()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/transactions` | -| `getTransactionById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/transactions/{transaction_id}` | -| `createConversion()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion` | -| `getWalletTransactions()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions` | -| `createTransfer()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers` | -| `createWithdrawal()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals` | -| `getPortfolioWallets()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets` | -| `createWallet()` | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets` | -| `getWalletById()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}` | -| `getWalletDepositInstructions()` | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions` | +| [createPortfolioAllocations()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L64) | :closed_lock_with_key: | POST | `/v1/allocations` | +| [createPortfolioNetAllocations()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L75) | :closed_lock_with_key: | POST | `/v1/allocations/net` | +| [getPortfolioAllocations()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L86) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations` | +| [getAllocationById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L98) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations/{allocation_id}` | +| [getNetAllocationsByNettingId()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L113) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/allocations/net/{netting_id}` | +| [getInvoices()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L134) | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/invoices` | +| [getAssets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L150) | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/assets` | +| [getEntityPaymentMethods()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L165) | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/payment-methods` | +| [getEntityPaymentMethod()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L174) | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/payment-methods/{payment_method_id}` | +| [getUsers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L195) | :closed_lock_with_key: | GET | `/v1/entities/{entity_id}/users` | +| [getPortfolioUsers()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L205) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/users` | +| [getPortfolios()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L221) | :closed_lock_with_key: | GET | `/v1/portfolios` | +| [getPortfolioById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L230) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}` | +| [getPortfolioCreditInformation()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L239) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/credit` | +| [getActivities()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L256) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/activities` | +| [getActivityById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L266) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/activities/{activity_id}` | +| [getAddressBook()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L287) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/address_book` | +| [createAddressBookEntry()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L300) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/address_book` | +| [getPortfolioBalances()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L320) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/balances` | +| [getWalletBalance()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L334) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance` | +| [getWeb3WalletBalances()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L349) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances` | +| [getPortfolioCommission()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L370) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/commission` | +| [getOpenOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L385) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/open_orders` | +| [submitOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L395) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/order` | +| [getOrderPreview()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L408) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/order_preview` | +| [getPortfolioOrders()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L420) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders` | +| [getOrderById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L430) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders/{order_id}` | +| [cancelOrder()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L443) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/orders/{order_id}/cancel` | +| [getOrderFills()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L458) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/orders/{order_id}/fills` | +| [getPortfolioProducts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L477) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/products` | +| [getPortfolioTransactions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L493) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/transactions` | +| [getTransactionById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L508) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/transactions/{transaction_id}` | +| [createConversion()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L523) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion` | +| [getWalletTransactions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L536) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions` | +| [createTransfer()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L551) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers` | +| [createWithdrawal()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L564) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals` | +| [getPortfolioWallets()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L583) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets` | +| [createWallet()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L593) | :closed_lock_with_key: | POST | `/v1/portfolios/{portfolio_id}/wallets` | +| [getWalletById()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L605) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}` | +| [getWalletDepositInstructions()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L620) | :closed_lock_with_key: | GET | `/v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions` | # CBCommerceClient.ts @@ -322,11 +322,11 @@ This table includes all endpoints from the official Exchange API docs and corres | Function | AUTH | HTTP Method | Endpoint | | -------- | :------: | :------: | -------- | -| `createCharge()` | :closed_lock_with_key: | POST | `/charges` | -| `getAllCharges()` | :closed_lock_with_key: | GET | `/charges` | -| `getCharge()` | :closed_lock_with_key: | GET | `/charges/{charge_code_or_charge_id}` | -| `createCheckout()` | :closed_lock_with_key: | POST | `/checkouts` | -| `getAllCheckouts()` | :closed_lock_with_key: | GET | `/checkouts` | -| `getCheckout()` | :closed_lock_with_key: | GET | `/checkouts/{checkout_id}` | -| `listEvents()` | :closed_lock_with_key: | GET | `/events` | -| `showEvent()` | :closed_lock_with_key: | GET | `/events/{event_id}` | \ No newline at end of file +| [createCharge()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L38) | :closed_lock_with_key: | POST | `/charges` | +| [getAllCharges()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L63) | :closed_lock_with_key: | GET | `/charges` | +| [getCharge()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L72) | :closed_lock_with_key: | GET | `/charges/{charge_code_or_charge_id}` | +| [createCheckout()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L87) | :closed_lock_with_key: | POST | `/checkouts` | +| [getAllCheckouts()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L110) | :closed_lock_with_key: | GET | `/checkouts` | +| [getCheckout()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L119) | :closed_lock_with_key: | GET | `/checkouts/{checkout_id}` | +| [listEvents()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L134) | :closed_lock_with_key: | GET | `/events` | +| [showEvent()](https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L145) | :closed_lock_with_key: | GET | `/events/{event_id}` | \ No newline at end of file diff --git a/examples/apidoc/CBAdvancedTradeClient/allocatePortfolio.js b/examples/apidoc/CBAdvancedTradeClient/allocatePortfolio.js new file mode 100644 index 0000000..0c7bf01 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/allocatePortfolio.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/allocate + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L583 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.allocatePortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/cancelOrders.js b/examples/apidoc/CBAdvancedTradeClient/cancelOrders.js new file mode 100644 index 0000000..800927d --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/cancelOrders.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/batch_cancel + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L223 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/cancelPendingFuturesSweep.js b/examples/apidoc/CBAdvancedTradeClient/cancelPendingFuturesSweep.js new file mode 100644 index 0000000..2b877bc --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/cancelPendingFuturesSweep.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/sweeps + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L567 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelPendingFuturesSweep(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/closePosition.js b/examples/apidoc/CBAdvancedTradeClient/closePosition.js new file mode 100644 index 0000000..73fe363 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/closePosition.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/close_position + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L335 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.closePosition(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/commitConvertTrade.js b/examples/apidoc/CBAdvancedTradeClient/commitConvertTrade.js new file mode 100644 index 0000000..80006cc --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/commitConvertTrade.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/convert/trade/{trade_id} + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L716 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.commitConvertTrade(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/createPortfolio.js b/examples/apidoc/CBAdvancedTradeClient/createPortfolio.js new file mode 100644 index 0000000..9407b00 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/createPortfolio.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L368 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createPortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/deletePortfolio.js b/examples/apidoc/CBAdvancedTradeClient/deletePortfolio.js new file mode 100644 index 0000000..a051d96 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/deletePortfolio.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios/{portfolio_uuid} + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L411 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.deletePortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getAccount.js b/examples/apidoc/CBAdvancedTradeClient/getAccount.js new file mode 100644 index 0000000..14b1131 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getAccount.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/accounts/{account_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L99 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getAccounts.js b/examples/apidoc/CBAdvancedTradeClient/getAccounts.js new file mode 100644 index 0000000..ac2691b --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getAccounts.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/accounts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L85 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccounts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getApiKeyPermissions.js b/examples/apidoc/CBAdvancedTradeClient/getApiKeyPermissions.js new file mode 100644 index 0000000..9a0a3a6 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getApiKeyPermissions.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/key_permissions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L850 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getApiKeyPermissions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getBestBidAsk.js b/examples/apidoc/CBAdvancedTradeClient/getBestBidAsk.js new file mode 100644 index 0000000..c3d8d07 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getBestBidAsk.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/best_bid_ask + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L116 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBestBidAsk(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getConvertTrade.js b/examples/apidoc/CBAdvancedTradeClient/getConvertTrade.js new file mode 100644 index 0000000..6ce482a --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getConvertTrade.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/convert/trade/{trade_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L699 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConvertTrade(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getCurrentMarginWindow.js b/examples/apidoc/CBAdvancedTradeClient/getCurrentMarginWindow.js new file mode 100644 index 0000000..5d3ca7c --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getCurrentMarginWindow.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/intraday/current_margin_window + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L494 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCurrentMarginWindow(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getFills.js b/examples/apidoc/CBAdvancedTradeClient/getFills.js new file mode 100644 index 0000000..9a6d7bb --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getFills.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/historical/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L291 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getFuturesBalanceSummary.js b/examples/apidoc/CBAdvancedTradeClient/getFuturesBalanceSummary.js new file mode 100644 index 0000000..d694d6a --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getFuturesBalanceSummary.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/balance_summary + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L453 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesBalanceSummary(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getFuturesPosition.js b/examples/apidoc/CBAdvancedTradeClient/getFuturesPosition.js new file mode 100644 index 0000000..59d1c47 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getFuturesPosition.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/positions/{product_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L520 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPosition(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getFuturesPositions.js b/examples/apidoc/CBAdvancedTradeClient/getFuturesPositions.js new file mode 100644 index 0000000..e553c30 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getFuturesPositions.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/positions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L511 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesPositions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getFuturesSweeps.js b/examples/apidoc/CBAdvancedTradeClient/getFuturesSweeps.js new file mode 100644 index 0000000..a971fb8 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getFuturesSweeps.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/sweeps + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L558 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFuturesSweeps(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getIntradayMarginSetting.js b/examples/apidoc/CBAdvancedTradeClient/getIntradayMarginSetting.js new file mode 100644 index 0000000..e18181c --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getIntradayMarginSetting.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/intraday/margin_setting + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L464 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getIntradayMarginSetting(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getMarketTrades.js b/examples/apidoc/CBAdvancedTradeClient/getMarketTrades.js new file mode 100644 index 0000000..d704398 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getMarketTrades.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/products/{product_id}/ticker + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L184 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMarketTrades(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getOrder.js b/examples/apidoc/CBAdvancedTradeClient/getOrder.js new file mode 100644 index 0000000..b5724f2 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getOrder.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/historical/{order_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L303 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getOrders.js b/examples/apidoc/CBAdvancedTradeClient/getOrders.js new file mode 100644 index 0000000..6b29896 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getOrders.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/historical/batch + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L276 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPaymentMethod.js b/examples/apidoc/CBAdvancedTradeClient/getPaymentMethod.js new file mode 100644 index 0000000..2fe1c73 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPaymentMethod.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/payment_methods/{payment_method_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L830 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPaymentMethod(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPaymentMethods.js b/examples/apidoc/CBAdvancedTradeClient/getPaymentMethods.js new file mode 100644 index 0000000..621b722 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPaymentMethods.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/payment_methods + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L819 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPaymentMethods(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPortfolioSummary.js b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPortfolioSummary.js new file mode 100644 index 0000000..7d5de8e --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPortfolioSummary.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/portfolio/{portfolio_uuid} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L594 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPerpetualsPortfolioSummary(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPosition.js b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPosition.js new file mode 100644 index 0000000..8a125a5 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPosition.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L623 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPerpetualsPosition(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPositions.js b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPositions.js new file mode 100644 index 0000000..8aa55b1 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPerpetualsPositions.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/positions/{portfolio_uuid} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L608 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPerpetualsPositions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPortfolioBreakdown.js b/examples/apidoc/CBAdvancedTradeClient/getPortfolioBreakdown.js new file mode 100644 index 0000000..7f3f758 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPortfolioBreakdown.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios/{portfolio_uuid} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L395 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioBreakdown(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPortfolios.js b/examples/apidoc/CBAdvancedTradeClient/getPortfolios.js new file mode 100644 index 0000000..eb2eb3c --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPortfolios.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L355 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPortfoliosBalances.js b/examples/apidoc/CBAdvancedTradeClient/getPortfoliosBalances.js new file mode 100644 index 0000000..d70fd04 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPortfoliosBalances.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/balances/{portfolio_uuid} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L638 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfoliosBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getProduct.js b/examples/apidoc/CBAdvancedTradeClient/getProduct.js new file mode 100644 index 0000000..3c38a29 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getProduct.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/products/{product_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L153 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProduct(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getProductBook.js b/examples/apidoc/CBAdvancedTradeClient/getProductBook.js new file mode 100644 index 0000000..47e6ede --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getProductBook.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/product_book + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L127 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getProductCandles.js b/examples/apidoc/CBAdvancedTradeClient/getProductCandles.js new file mode 100644 index 0000000..5fbf5bd --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getProductCandles.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/products/{product_id}/candles + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L169 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getProducts.js b/examples/apidoc/CBAdvancedTradeClient/getProducts.js new file mode 100644 index 0000000..7c4dae6 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getProducts.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/products + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L141 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProducts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPublicMarketTrades.js b/examples/apidoc/CBAdvancedTradeClient/getPublicMarketTrades.js new file mode 100644 index 0000000..8f49b8d --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPublicMarketTrades.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/market/products/{product_id}/ticker + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L798 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPublicMarketTrades(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPublicProduct.js b/examples/apidoc/CBAdvancedTradeClient/getPublicProduct.js new file mode 100644 index 0000000..17dd0ae --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPublicProduct.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/market/products/{product_id} + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L771 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPublicProduct(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPublicProductBook.js b/examples/apidoc/CBAdvancedTradeClient/getPublicProductBook.js new file mode 100644 index 0000000..5fa5b9f --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPublicProductBook.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/market/product_book + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L746 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPublicProductBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPublicProductCandles.js b/examples/apidoc/CBAdvancedTradeClient/getPublicProductCandles.js new file mode 100644 index 0000000..8151c68 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPublicProductCandles.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/market/products/{product_id}/candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L783 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPublicProductCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getPublicProducts.js b/examples/apidoc/CBAdvancedTradeClient/getPublicProducts.js new file mode 100644 index 0000000..66131e3 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getPublicProducts.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/market/products + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L759 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPublicProducts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getServerTime.js b/examples/apidoc/CBAdvancedTradeClient/getServerTime.js new file mode 100644 index 0000000..beae01c --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getServerTime.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/time + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L733 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getServerTime(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/getTransactionSummary.js b/examples/apidoc/CBAdvancedTradeClient/getTransactionSummary.js new file mode 100644 index 0000000..a4fe4af --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/getTransactionSummary.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/transaction_summary + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L670 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransactionSummary(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/movePortfolioFunds.js b/examples/apidoc/CBAdvancedTradeClient/movePortfolioFunds.js new file mode 100644 index 0000000..0288a70 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/movePortfolioFunds.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios/move_funds + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L381 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.movePortfolioFunds(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/previewOrder.js b/examples/apidoc/CBAdvancedTradeClient/previewOrder.js new file mode 100644 index 0000000..9779578 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/previewOrder.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/preview + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L321 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.previewOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/scheduleFuturesSweep.js b/examples/apidoc/CBAdvancedTradeClient/scheduleFuturesSweep.js new file mode 100644 index 0000000..74ec122 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/scheduleFuturesSweep.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/sweeps/schedule + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L540 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.scheduleFuturesSweep(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/setIntradayMarginSetting.js b/examples/apidoc/CBAdvancedTradeClient/setIntradayMarginSetting.js new file mode 100644 index 0000000..012f6e6 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/setIntradayMarginSetting.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/cfm/intraday/margin_setting + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L478 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setIntradayMarginSetting(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/submitConvertQuote.js b/examples/apidoc/CBAdvancedTradeClient/submitConvertQuote.js new file mode 100644 index 0000000..359e8a2 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/submitConvertQuote.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/convert/quote + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L688 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitConvertQuote(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/submitOrder.js b/examples/apidoc/CBAdvancedTradeClient/submitOrder.js new file mode 100644 index 0000000..d63b531 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/submitOrder.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L206 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/updateMultiAssetCollateral.js b/examples/apidoc/CBAdvancedTradeClient/updateMultiAssetCollateral.js new file mode 100644 index 0000000..22fdeaf --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/updateMultiAssetCollateral.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/intx/multi_asset_collateral + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L650 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateMultiAssetCollateral(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/updateOrder.js b/examples/apidoc/CBAdvancedTradeClient/updateOrder.js new file mode 100644 index 0000000..97f1698 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/updateOrder.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/edit + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L240 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/updateOrderPreview.js b/examples/apidoc/CBAdvancedTradeClient/updateOrderPreview.js new file mode 100644 index 0000000..fc3b537 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/updateOrderPreview.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/orders/edit_preview + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L256 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateOrderPreview(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAdvancedTradeClient/updatePortfolio.js b/examples/apidoc/CBAdvancedTradeClient/updatePortfolio.js new file mode 100644 index 0000000..392d590 --- /dev/null +++ b/examples/apidoc/CBAdvancedTradeClient/updatePortfolio.js @@ -0,0 +1,21 @@ +const { CBAdvancedTradeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v3/brokerage/portfolios/{portfolio_uuid} + // METHOD: PUT + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAdvancedTradeClient.ts#L422 + +const client = new CBAdvancedTradeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updatePortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/commitDeposit.js b/examples/apidoc/CBAppClient/commitDeposit.js new file mode 100644 index 0000000..ef557e2 --- /dev/null +++ b/examples/apidoc/CBAppClient/commitDeposit.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/deposits/{deposit_id}/commit + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L264 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.commitDeposit(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/commitWithdrawal.js b/examples/apidoc/CBAppClient/commitWithdrawal.js new file mode 100644 index 0000000..b59be9d --- /dev/null +++ b/examples/apidoc/CBAppClient/commitWithdrawal.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/withdrawals/{withdrawal_id}/commit + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L329 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.commitWithdrawal(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/createAddress.js b/examples/apidoc/CBAppClient/createAddress.js new file mode 100644 index 0000000..2bdc137 --- /dev/null +++ b/examples/apidoc/CBAppClient/createAddress.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/addresses + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L96 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/depositFunds.js b/examples/apidoc/CBAppClient/depositFunds.js new file mode 100644 index 0000000..ec9e2d5 --- /dev/null +++ b/examples/apidoc/CBAppClient/depositFunds.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/deposits + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L250 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.depositFunds(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getAccount.js b/examples/apidoc/CBAppClient/getAccount.js new file mode 100644 index 0000000..d36726d --- /dev/null +++ b/examples/apidoc/CBAppClient/getAccount.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L79 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getAccounts.js b/examples/apidoc/CBAppClient/getAccounts.js new file mode 100644 index 0000000..5f19dd8 --- /dev/null +++ b/examples/apidoc/CBAppClient/getAccounts.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L64 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccounts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getAddress.js b/examples/apidoc/CBAppClient/getAddress.js new file mode 100644 index 0000000..387b801 --- /dev/null +++ b/examples/apidoc/CBAppClient/getAddress.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/addresses/{addressId} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L133 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getAddressTransactions.js b/examples/apidoc/CBAppClient/getAddressTransactions.js new file mode 100644 index 0000000..fcfff16 --- /dev/null +++ b/examples/apidoc/CBAppClient/getAddressTransactions.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/addresses/{addressId}/transactions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L150 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAddressTransactions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getAddresses.js b/examples/apidoc/CBAppClient/getAddresses.js new file mode 100644 index 0000000..3b96874 --- /dev/null +++ b/examples/apidoc/CBAppClient/getAddresses.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/addresses + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L112 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAddresses(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getBuyPrice.js b/examples/apidoc/CBAppClient/getBuyPrice.js new file mode 100644 index 0000000..da9dbfd --- /dev/null +++ b/examples/apidoc/CBAppClient/getBuyPrice.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/prices/{currencyPair}/buy + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L435 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBuyPrice(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getCryptocurrencies.js b/examples/apidoc/CBAppClient/getCryptocurrencies.js new file mode 100644 index 0000000..38d62af --- /dev/null +++ b/examples/apidoc/CBAppClient/getCryptocurrencies.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/currencies/crypto + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L398 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCryptocurrencies(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getCurrentTime.js b/examples/apidoc/CBAppClient/getCurrentTime.js new file mode 100644 index 0000000..13ce139 --- /dev/null +++ b/examples/apidoc/CBAppClient/getCurrentTime.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/time + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L487 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCurrentTime(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getDeposit.js b/examples/apidoc/CBAppClient/getDeposit.js new file mode 100644 index 0000000..7b4ea32 --- /dev/null +++ b/examples/apidoc/CBAppClient/getDeposit.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/deposits/{deposit_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L296 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getDeposit(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getDeposits.js b/examples/apidoc/CBAppClient/getDeposits.js new file mode 100644 index 0000000..fc9096e --- /dev/null +++ b/examples/apidoc/CBAppClient/getDeposits.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/deposits + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L281 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getDeposits(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getExchangeRates.js b/examples/apidoc/CBAppClient/getExchangeRates.js new file mode 100644 index 0000000..4c12a24 --- /dev/null +++ b/examples/apidoc/CBAppClient/getExchangeRates.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/exchange-rates + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L414 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getExchangeRates(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getFiatCurrencies.js b/examples/apidoc/CBAppClient/getFiatCurrencies.js new file mode 100644 index 0000000..62dcd6c --- /dev/null +++ b/examples/apidoc/CBAppClient/getFiatCurrencies.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/currencies + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L387 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFiatCurrencies(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getSellPrice.js b/examples/apidoc/CBAppClient/getSellPrice.js new file mode 100644 index 0000000..8d4d6b0 --- /dev/null +++ b/examples/apidoc/CBAppClient/getSellPrice.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/prices/{currencyPair}/sell + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L450 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSellPrice(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getSpotPrice.js b/examples/apidoc/CBAppClient/getSpotPrice.js new file mode 100644 index 0000000..13a9332 --- /dev/null +++ b/examples/apidoc/CBAppClient/getSpotPrice.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/prices/{currencyPair}/spot + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L465 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSpotPrice(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getTransaction.js b/examples/apidoc/CBAppClient/getTransaction.js new file mode 100644 index 0000000..47722c7 --- /dev/null +++ b/examples/apidoc/CBAppClient/getTransaction.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/transactions/{transactionId} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L228 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransaction(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getTransactions.js b/examples/apidoc/CBAppClient/getTransactions.js new file mode 100644 index 0000000..85db15c --- /dev/null +++ b/examples/apidoc/CBAppClient/getTransactions.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/transactions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L210 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransactions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getWithdrawal.js b/examples/apidoc/CBAppClient/getWithdrawal.js new file mode 100644 index 0000000..227f832 --- /dev/null +++ b/examples/apidoc/CBAppClient/getWithdrawal.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/withdrawals/{withdrawal_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L364 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWithdrawal(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/getWithdrawals.js b/examples/apidoc/CBAppClient/getWithdrawals.js new file mode 100644 index 0000000..16a5aa1 --- /dev/null +++ b/examples/apidoc/CBAppClient/getWithdrawals.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/withdrawals + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L346 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWithdrawals(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/sendMoney.js b/examples/apidoc/CBAppClient/sendMoney.js new file mode 100644 index 0000000..c4f0be8 --- /dev/null +++ b/examples/apidoc/CBAppClient/sendMoney.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/transactions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L178 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.sendMoney(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/transferMoney.js b/examples/apidoc/CBAppClient/transferMoney.js new file mode 100644 index 0000000..f62e7fc --- /dev/null +++ b/examples/apidoc/CBAppClient/transferMoney.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/transactions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L193 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.transferMoney(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBAppClient/withdrawFunds.js b/examples/apidoc/CBAppClient/withdrawFunds.js new file mode 100644 index 0000000..3ae2d56 --- /dev/null +++ b/examples/apidoc/CBAppClient/withdrawFunds.js @@ -0,0 +1,21 @@ +const { CBAppClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v2/accounts/{account_id}/withdrawals + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBAppClient.ts#L315 + +const client = new CBAppClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawFunds(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/createCharge.js b/examples/apidoc/CBCommerceClient/createCharge.js new file mode 100644 index 0000000..448a2ca --- /dev/null +++ b/examples/apidoc/CBCommerceClient/createCharge.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /charges + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L38 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createCharge(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/createCheckout.js b/examples/apidoc/CBCommerceClient/createCheckout.js new file mode 100644 index 0000000..21d3951 --- /dev/null +++ b/examples/apidoc/CBCommerceClient/createCheckout.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /checkouts + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L87 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createCheckout(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/getAllCharges.js b/examples/apidoc/CBCommerceClient/getAllCharges.js new file mode 100644 index 0000000..c44d8a5 --- /dev/null +++ b/examples/apidoc/CBCommerceClient/getAllCharges.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /charges + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L63 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllCharges(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/getAllCheckouts.js b/examples/apidoc/CBCommerceClient/getAllCheckouts.js new file mode 100644 index 0000000..87379b9 --- /dev/null +++ b/examples/apidoc/CBCommerceClient/getAllCheckouts.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /checkouts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L110 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllCheckouts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/getCharge.js b/examples/apidoc/CBCommerceClient/getCharge.js new file mode 100644 index 0000000..ab25a0b --- /dev/null +++ b/examples/apidoc/CBCommerceClient/getCharge.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /charges/{charge_code_or_charge_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L72 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCharge(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/getCheckout.js b/examples/apidoc/CBCommerceClient/getCheckout.js new file mode 100644 index 0000000..d6cc75e --- /dev/null +++ b/examples/apidoc/CBCommerceClient/getCheckout.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /checkouts/{checkout_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L119 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCheckout(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/listEvents.js b/examples/apidoc/CBCommerceClient/listEvents.js new file mode 100644 index 0000000..3b59adf --- /dev/null +++ b/examples/apidoc/CBCommerceClient/listEvents.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /events + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L134 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.listEvents(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBCommerceClient/showEvent.js b/examples/apidoc/CBCommerceClient/showEvent.js new file mode 100644 index 0000000..6cec2f2 --- /dev/null +++ b/examples/apidoc/CBCommerceClient/showEvent.js @@ -0,0 +1,21 @@ +const { CBCommerceClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /events/{event_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBCommerceClient.ts#L145 + +const client = new CBCommerceClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.showEvent(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/addAddresses.js b/examples/apidoc/CBExchangeClient/addAddresses.js new file mode 100644 index 0000000..3f8e183 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/addAddresses.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /address-book + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L144 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.addAddresses(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/cancelAllOrders.js b/examples/apidoc/CBExchangeClient/cancelAllOrders.js new file mode 100644 index 0000000..5e0b3bf --- /dev/null +++ b/examples/apidoc/CBExchangeClient/cancelAllOrders.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /orders + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L402 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelAllOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/cancelOrder.js b/examples/apidoc/CBExchangeClient/cancelOrder.js new file mode 100644 index 0000000..7d767ba --- /dev/null +++ b/examples/apidoc/CBExchangeClient/cancelOrder.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /orders/{order_id} + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L435 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/convertCurrency.js b/examples/apidoc/CBExchangeClient/convertCurrency.js new file mode 100644 index 0000000..0389502 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/convertCurrency.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /conversions + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L195 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.convertCurrency(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/createNewCryptoAddress.js b/examples/apidoc/CBExchangeClient/createNewCryptoAddress.js new file mode 100644 index 0000000..de08561 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/createNewCryptoAddress.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /coinbase-accounts/{account_id}/addresses + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L177 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createNewCryptoAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/createProfile.js b/examples/apidoc/CBExchangeClient/createProfile.js new file mode 100644 index 0000000..c4b9d0a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/createProfile.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L687 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createProfile(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/createReport.js b/examples/apidoc/CBExchangeClient/createReport.js new file mode 100644 index 0000000..08fd7e4 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/createReport.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /reports + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L759 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createReport(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/createStakeWrap.js b/examples/apidoc/CBExchangeClient/createStakeWrap.js new file mode 100644 index 0000000..ae93849 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/createStakeWrap.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets/stake-wrap + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L879 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createStakeWrap(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/createTravelRuleEntry.js b/examples/apidoc/CBExchangeClient/createTravelRuleEntry.js new file mode 100644 index 0000000..4783673 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/createTravelRuleEntry.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /travel-rules + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L794 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createTravelRuleEntry(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/deleteAddress.js b/examples/apidoc/CBExchangeClient/deleteAddress.js new file mode 100644 index 0000000..e5e0f12 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/deleteAddress.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /address-book/{id} + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L153 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.deleteAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/deleteProfile.js b/examples/apidoc/CBExchangeClient/deleteProfile.js new file mode 100644 index 0000000..c4ef5e6 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/deleteProfile.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles/{profile_id}/deactivate + // METHOD: PUT + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L731 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.deleteProfile(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/deleteTravelRuleEntry.js b/examples/apidoc/CBExchangeClient/deleteTravelRuleEntry.js new file mode 100644 index 0000000..d617e94 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/deleteTravelRuleEntry.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /travel-rules/{id} + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L807 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.deleteTravelRuleEntry(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/depositFromCoinbaseAccount.js b/examples/apidoc/CBExchangeClient/depositFromCoinbaseAccount.js new file mode 100644 index 0000000..9cb837f --- /dev/null +++ b/examples/apidoc/CBExchangeClient/depositFromCoinbaseAccount.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /deposits/coinbase-account + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L256 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.depositFromCoinbaseAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/depositFromPaymentMethod.js b/examples/apidoc/CBExchangeClient/depositFromPaymentMethod.js new file mode 100644 index 0000000..3beed84 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/depositFromPaymentMethod.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /deposits/payment-method + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L270 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.depositFromPaymentMethod(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAccount.js b/examples/apidoc/CBExchangeClient/getAccount.js new file mode 100644 index 0000000..44b6787 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAccount.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /accounts/{account_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L79 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAccountHolds.js b/examples/apidoc/CBExchangeClient/getAccountHolds.js new file mode 100644 index 0000000..85a16fc --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAccountHolds.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /accounts/{account_id}/holds + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L90 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccountHolds(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAccountLedger.js b/examples/apidoc/CBExchangeClient/getAccountLedger.js new file mode 100644 index 0000000..a531702 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAccountLedger.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /accounts/{account_id}/ledger + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L109 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccountLedger(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAccountTransfers.js b/examples/apidoc/CBExchangeClient/getAccountTransfers.js new file mode 100644 index 0000000..0d6ba66 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAccountTransfers.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /accounts/{account_id}/transfers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L119 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccountTransfers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAccounts.js b/examples/apidoc/CBExchangeClient/getAccounts.js new file mode 100644 index 0000000..e10afba --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAccounts.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /accounts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L70 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAccounts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAddressBook.js b/examples/apidoc/CBExchangeClient/getAddressBook.js new file mode 100644 index 0000000..eff6b4c --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAddressBook.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /address-book + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L135 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAddressBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAllProductVolume.js b/examples/apidoc/CBExchangeClient/getAllProductVolume.js new file mode 100644 index 0000000..6161bf0 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAllProductVolume.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/volume-summary + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L603 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllProductVolume(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAllReports.js b/examples/apidoc/CBExchangeClient/getAllReports.js new file mode 100644 index 0000000..ce221f3 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAllReports.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /reports + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L749 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllReports(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAllStakeWraps.js b/examples/apidoc/CBExchangeClient/getAllStakeWraps.js new file mode 100644 index 0000000..765017d --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAllStakeWraps.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets/stake-wrap + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L870 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllStakeWraps(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAllTradingPairs.js b/examples/apidoc/CBExchangeClient/getAllTradingPairs.js new file mode 100644 index 0000000..2765ec2 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAllTradingPairs.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L594 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllTradingPairs(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getAllWrappedAssets.js b/examples/apidoc/CBExchangeClient/getAllWrappedAssets.js new file mode 100644 index 0000000..b47e355 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getAllWrappedAssets.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L861 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllWrappedAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getCoinbaseWallets.js b/examples/apidoc/CBExchangeClient/getCoinbaseWallets.js new file mode 100644 index 0000000..2a02544 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getCoinbaseWallets.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /coinbase-accounts + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L168 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCoinbaseWallets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getConversion.js b/examples/apidoc/CBExchangeClient/getConversion.js new file mode 100644 index 0000000..da6d8d4 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getConversion.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /conversions/{conversion_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L213 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConversion(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getConversionFeeRates.js b/examples/apidoc/CBExchangeClient/getConversionFeeRates.js new file mode 100644 index 0000000..751ee62 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getConversionFeeRates.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /conversions/fees + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L204 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getConversionFeeRates(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getCryptoWithdrawalFeeEstimate.js b/examples/apidoc/CBExchangeClient/getCryptoWithdrawalFeeEstimate.js new file mode 100644 index 0000000..12c8dbd --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getCryptoWithdrawalFeeEstimate.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /withdrawals/fee-estimate + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L340 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCryptoWithdrawalFeeEstimate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getCurrencies.js b/examples/apidoc/CBExchangeClient/getCurrencies.js new file mode 100644 index 0000000..cb9abad --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getCurrencies.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /currencies + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L232 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCurrencies(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getCurrency.js b/examples/apidoc/CBExchangeClient/getCurrency.js new file mode 100644 index 0000000..35aa9eb --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getCurrency.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /currencies/{currency_id} + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L241 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getCurrency(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getFees.js b/examples/apidoc/CBExchangeClient/getFees.js new file mode 100644 index 0000000..607277a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getFees.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /fees + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L368 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFees(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getFills.js b/examples/apidoc/CBExchangeClient/getFills.js new file mode 100644 index 0000000..c639671 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getFills.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L383 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getInterestCharges.js b/examples/apidoc/CBExchangeClient/getInterestCharges.js new file mode 100644 index 0000000..034688f --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getInterestCharges.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/interest/{loan_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L489 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInterestCharges(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getInterestRateHistory.js b/examples/apidoc/CBExchangeClient/getInterestRateHistory.js new file mode 100644 index 0000000..8161fc8 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getInterestRateHistory.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/interest/history/{loan_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L480 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInterestRateHistory(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getInterestSummaries.js b/examples/apidoc/CBExchangeClient/getInterestSummaries.js new file mode 100644 index 0000000..3250232 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getInterestSummaries.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/interest + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L471 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInterestSummaries(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getLendingOverview.js b/examples/apidoc/CBExchangeClient/getLendingOverview.js new file mode 100644 index 0000000..c5ba46c --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getLendingOverview.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/lending-overview + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L501 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLendingOverview(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getLoanAssets.js b/examples/apidoc/CBExchangeClient/getLoanAssets.js new file mode 100644 index 0000000..cd02baf --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getLoanAssets.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L462 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoanAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getLoans.js b/examples/apidoc/CBExchangeClient/getLoans.js new file mode 100644 index 0000000..8acf89a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getLoans.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L453 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getLoans(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getNewLoanOptions.js b/examples/apidoc/CBExchangeClient/getNewLoanOptions.js new file mode 100644 index 0000000..03c41eb --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getNewLoanOptions.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/options + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L534 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getNewLoanOptions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getNewLoanPreview.js b/examples/apidoc/CBExchangeClient/getNewLoanPreview.js new file mode 100644 index 0000000..d936b49 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getNewLoanPreview.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/loan-preview + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L512 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getNewLoanPreview(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getOrder.js b/examples/apidoc/CBExchangeClient/getOrder.js new file mode 100644 index 0000000..5676ac3 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getOrder.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /orders/{order_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L425 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getOrders.js b/examples/apidoc/CBExchangeClient/getOrders.js new file mode 100644 index 0000000..ddd1c43 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getOrders.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L393 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getPaymentMethods.js b/examples/apidoc/CBExchangeClient/getPaymentMethods.js new file mode 100644 index 0000000..4037b43 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getPaymentMethods.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /payment-methods + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L281 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPaymentMethods(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getPrincipalRepaymentPreview.js b/examples/apidoc/CBExchangeClient/getPrincipalRepaymentPreview.js new file mode 100644 index 0000000..2f54e9b --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getPrincipalRepaymentPreview.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/repayment-preview + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L562 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPrincipalRepaymentPreview(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProduct.js b/examples/apidoc/CBExchangeClient/getProduct.js new file mode 100644 index 0000000..680fc6e --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProduct.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id} + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L612 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProduct(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProductBook.js b/examples/apidoc/CBExchangeClient/getProductBook.js new file mode 100644 index 0000000..61825f5 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProductBook.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id}/book + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L623 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProductCandles.js b/examples/apidoc/CBExchangeClient/getProductCandles.js new file mode 100644 index 0000000..c7d1f34 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProductCandles.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id}/candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L634 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductCandles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProductStats.js b/examples/apidoc/CBExchangeClient/getProductStats.js new file mode 100644 index 0000000..8b5817e --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProductStats.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id}/stats + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L644 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductStats(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProductTicker.js b/examples/apidoc/CBExchangeClient/getProductTicker.js new file mode 100644 index 0000000..4419496 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProductTicker.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id}/ticker + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L653 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductTicker(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProductTrades.js b/examples/apidoc/CBExchangeClient/getProductTrades.js new file mode 100644 index 0000000..18ef00f --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProductTrades.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /products/{product_id}/trades + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L662 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProductTrades(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProfileById.js b/examples/apidoc/CBExchangeClient/getProfileById.js new file mode 100644 index 0000000..3d204d1 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProfileById.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles/{profile_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L707 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProfileById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getProfiles.js b/examples/apidoc/CBExchangeClient/getProfiles.js new file mode 100644 index 0000000..56074cf --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getProfiles.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L678 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getProfiles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getReport.js b/examples/apidoc/CBExchangeClient/getReport.js new file mode 100644 index 0000000..c8a34fb --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getReport.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /reports/{report_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L768 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getReport(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getSignedPrices.js b/examples/apidoc/CBExchangeClient/getSignedPrices.js new file mode 100644 index 0000000..4b2e4d2 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getSignedPrices.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /oracle + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L579 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSignedPrices(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getStakeWrap.js b/examples/apidoc/CBExchangeClient/getStakeWrap.js new file mode 100644 index 0000000..7021256 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getStakeWrap.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets/stake-wrap/{stake_wrap_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L892 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getStakeWrap(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getTransfer.js b/examples/apidoc/CBExchangeClient/getTransfer.js new file mode 100644 index 0000000..678951f --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getTransfer.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /transfers/{transfer_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L299 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getTransfers.js b/examples/apidoc/CBExchangeClient/getTransfers.js new file mode 100644 index 0000000..54a0a8a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getTransfers.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /transfers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L290 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransfers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getTravelRuleInformation.js b/examples/apidoc/CBExchangeClient/getTravelRuleInformation.js new file mode 100644 index 0000000..0959228 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getTravelRuleInformation.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /travel-rules + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L783 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTravelRuleInformation(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getUserExchangeLimits.js b/examples/apidoc/CBExchangeClient/getUserExchangeLimits.js new file mode 100644 index 0000000..958b11a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getUserExchangeLimits.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /users/{user_id}/exchange-limits + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L822 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getUserExchangeLimits(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getUserTradingVolume.js b/examples/apidoc/CBExchangeClient/getUserTradingVolume.js new file mode 100644 index 0000000..2f9be3b --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getUserTradingVolume.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /users/{user_id}/trading-volumes + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L846 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getUserTradingVolume(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getWrappedAssetConversionRate.js b/examples/apidoc/CBExchangeClient/getWrappedAssetConversionRate.js new file mode 100644 index 0000000..c7aa29e --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getWrappedAssetConversionRate.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets/{wrapped_asset_id}/conversion-rate + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L912 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWrappedAssetConversionRate(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/getWrappedAssetDetails.js b/examples/apidoc/CBExchangeClient/getWrappedAssetDetails.js new file mode 100644 index 0000000..9b6e25c --- /dev/null +++ b/examples/apidoc/CBExchangeClient/getWrappedAssetDetails.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /wrapped-assets/{wrapped_asset_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L903 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWrappedAssetDetails(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/renameProfile.js b/examples/apidoc/CBExchangeClient/renameProfile.js new file mode 100644 index 0000000..66268cb --- /dev/null +++ b/examples/apidoc/CBExchangeClient/renameProfile.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles/{profile_id} + // METHOD: PUT + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L720 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.renameProfile(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/repayLoanInterest.js b/examples/apidoc/CBExchangeClient/repayLoanInterest.js new file mode 100644 index 0000000..23e85fd --- /dev/null +++ b/examples/apidoc/CBExchangeClient/repayLoanInterest.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/repay-interest + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L543 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.repayLoanInterest(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/repayLoanPrincipal.js b/examples/apidoc/CBExchangeClient/repayLoanPrincipal.js new file mode 100644 index 0000000..072970a --- /dev/null +++ b/examples/apidoc/CBExchangeClient/repayLoanPrincipal.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/repay-principal + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L552 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.repayLoanPrincipal(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/submitNewLoan.js b/examples/apidoc/CBExchangeClient/submitNewLoan.js new file mode 100644 index 0000000..401c0c4 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/submitNewLoan.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /loans/open + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L525 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitNewLoan(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/submitOrder.js b/examples/apidoc/CBExchangeClient/submitOrder.js new file mode 100644 index 0000000..0b37f59 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/submitOrder.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L415 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/submitTravelInformation.js b/examples/apidoc/CBExchangeClient/submitTravelInformation.js new file mode 100644 index 0000000..0805769 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/submitTravelInformation.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /transfers/{transfer_id}/travel-rules + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L308 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitTravelInformation(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/transferFundsBetweenProfiles.js b/examples/apidoc/CBExchangeClient/transferFundsBetweenProfiles.js new file mode 100644 index 0000000..e82b65b --- /dev/null +++ b/examples/apidoc/CBExchangeClient/transferFundsBetweenProfiles.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /profiles/transfer + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L696 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.transferFundsBetweenProfiles(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/updateSettlementPreference.js b/examples/apidoc/CBExchangeClient/updateSettlementPreference.js new file mode 100644 index 0000000..56ba656 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/updateSettlementPreference.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /users/{user_id}/settlement-preferences + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L831 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateSettlementPreference(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/withdrawToCoinbaseAccount.js b/examples/apidoc/CBExchangeClient/withdrawToCoinbaseAccount.js new file mode 100644 index 0000000..cadf662 --- /dev/null +++ b/examples/apidoc/CBExchangeClient/withdrawToCoinbaseAccount.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /withdrawals/coinbase-account + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L322 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawToCoinbaseAccount(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/withdrawToCryptoAddress.js b/examples/apidoc/CBExchangeClient/withdrawToCryptoAddress.js new file mode 100644 index 0000000..b8af5de --- /dev/null +++ b/examples/apidoc/CBExchangeClient/withdrawToCryptoAddress.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /withdrawals/crypto + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L331 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawToCryptoAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBExchangeClient/withdrawToPaymentMethod.js b/examples/apidoc/CBExchangeClient/withdrawToPaymentMethod.js new file mode 100644 index 0000000..4c95bbf --- /dev/null +++ b/examples/apidoc/CBExchangeClient/withdrawToPaymentMethod.js @@ -0,0 +1,21 @@ +const { CBExchangeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /withdrawals/payment-method + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBExchangeClient.ts#L352 + +const client = new CBExchangeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawToPaymentMethod(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/cancelOrder.js b/examples/apidoc/CBInternationalClient/cancelOrder.js new file mode 100644 index 0000000..d8b2b35 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/cancelOrder.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders/{id} + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L219 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/cancelOrders.js b/examples/apidoc/CBInternationalClient/cancelOrders.js new file mode 100644 index 0000000..3532e63 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/cancelOrders.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders + // METHOD: DELETE + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L188 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/createCounterpartyId.js b/examples/apidoc/CBInternationalClient/createCounterpartyId.js new file mode 100644 index 0000000..220661e --- /dev/null +++ b/examples/apidoc/CBInternationalClient/createCounterpartyId.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/create-counterparty-id + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L510 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createCounterpartyId(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/createCryptoAddress.js b/examples/apidoc/CBInternationalClient/createCryptoAddress.js new file mode 100644 index 0000000..f903cd6 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/createCryptoAddress.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/address + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L497 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createCryptoAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/createPortfolio.js b/examples/apidoc/CBInternationalClient/createPortfolio.js new file mode 100644 index 0000000..3665856 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/createPortfolio.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L246 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createPortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getAggregatedCandlesData.js b/examples/apidoc/CBInternationalClient/getAggregatedCandlesData.js new file mode 100644 index 0000000..cf6b602 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getAggregatedCandlesData.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments/{instrument}/candles + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L123 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAggregatedCandlesData(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getAssetDetails.js b/examples/apidoc/CBInternationalClient/getAssetDetails.js new file mode 100644 index 0000000..0bed3a6 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getAssetDetails.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/assets/{asset} + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L63 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAssetDetails(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getAssets.js b/examples/apidoc/CBInternationalClient/getAssets.js new file mode 100644 index 0000000..6df0072 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getAssets.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/assets + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L54 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getBalanceForPortfolioAsset.js b/examples/apidoc/CBInternationalClient/getBalanceForPortfolioAsset.js new file mode 100644 index 0000000..95c4250 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getBalanceForPortfolioAsset.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/balances/{asset} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L312 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getBalanceForPortfolioAsset(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getDailyTradingVolumes.js b/examples/apidoc/CBInternationalClient/getDailyTradingVolumes.js new file mode 100644 index 0000000..55ccf7a --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getDailyTradingVolumes.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments/volumes/daily + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L114 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getDailyTradingVolumes(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getFeeRateTiers.js b/examples/apidoc/CBInternationalClient/getFeeRateTiers.js new file mode 100644 index 0000000..7fa6f45 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getFeeRateTiers.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/fee-rate-tiers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L550 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFeeRateTiers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getFillsByPortfolios.js b/examples/apidoc/CBInternationalClient/getFillsByPortfolios.js new file mode 100644 index 0000000..1f23983 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getFillsByPortfolios.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L349 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getFillsByPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getHistoricalFundingRates.js b/examples/apidoc/CBInternationalClient/getHistoricalFundingRates.js new file mode 100644 index 0000000..1c43eec --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getHistoricalFundingRates.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments/{instrument}/funding + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L133 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getHistoricalFundingRates(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getInstrumentDetails.js b/examples/apidoc/CBInternationalClient/getInstrumentDetails.js new file mode 100644 index 0000000..3f6995a --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getInstrumentDetails.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments/{instrument} + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L96 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInstrumentDetails(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getInstruments.js b/examples/apidoc/CBInternationalClient/getInstruments.js new file mode 100644 index 0000000..73a49be --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getInstruments.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L87 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInstruments(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getMatchingTransfers.js b/examples/apidoc/CBInternationalClient/getMatchingTransfers.js new file mode 100644 index 0000000..8b83d25 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getMatchingTransfers.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L468 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getMatchingTransfers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getOpenOrders.js b/examples/apidoc/CBInternationalClient/getOpenOrders.js new file mode 100644 index 0000000..0038225 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getOpenOrders.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L179 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOpenOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getOrderDetails.js b/examples/apidoc/CBInternationalClient/getOrderDetails.js new file mode 100644 index 0000000..021ee29 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getOrderDetails.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders/{id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L209 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrderDetails(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioBalances.js b/examples/apidoc/CBInternationalClient/getPortfolioBalances.js new file mode 100644 index 0000000..c63413f --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioBalances.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/balances + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L303 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioDetails.js b/examples/apidoc/CBInternationalClient/getPortfolioDetails.js new file mode 100644 index 0000000..3206643 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioDetails.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/detail + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L285 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioDetails(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioFeeRates.js b/examples/apidoc/CBInternationalClient/getPortfolioFeeRates.js new file mode 100644 index 0000000..a817986 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioFeeRates.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/fee-rates + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L435 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioFeeRates(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioFills.js b/examples/apidoc/CBInternationalClient/getPortfolioFills.js new file mode 100644 index 0000000..07c20d7 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioFills.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L358 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioPositions.js b/examples/apidoc/CBInternationalClient/getPortfolioPositions.js new file mode 100644 index 0000000..e47dafc --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioPositions.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/positions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L326 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioPositions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPortfolioSummary.js b/examples/apidoc/CBInternationalClient/getPortfolioSummary.js new file mode 100644 index 0000000..90f4b70 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPortfolioSummary.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/summary + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L294 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioSummary(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPositionForPortfolioInstrument.js b/examples/apidoc/CBInternationalClient/getPositionForPortfolioInstrument.js new file mode 100644 index 0000000..1a1cf36 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPositionForPortfolioInstrument.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/positions/{instrument} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L335 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPositionForPortfolioInstrument(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getPositionOffsets.js b/examples/apidoc/CBInternationalClient/getPositionOffsets.js new file mode 100644 index 0000000..7de9d1b --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getPositionOffsets.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/position-offsets + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L153 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPositionOffsets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getQuotePerInstrument.js b/examples/apidoc/CBInternationalClient/getQuotePerInstrument.js new file mode 100644 index 0000000..aa41d80 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getQuotePerInstrument.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/instruments/{instrument}/quote + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L105 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getQuotePerInstrument(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getRankings.js b/examples/apidoc/CBInternationalClient/getRankings.js new file mode 100644 index 0000000..62b5b1a --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getRankings.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/rankings/statistics + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L449 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getRankings(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getSupportedNetworksPerAsset.js b/examples/apidoc/CBInternationalClient/getSupportedNetworksPerAsset.js new file mode 100644 index 0000000..fb5474f --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getSupportedNetworksPerAsset.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/assets/{asset}/networks + // METHOD: GET + // PUBLIC: YES + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L72 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getSupportedNetworksPerAsset(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getTransfer.js b/examples/apidoc/CBInternationalClient/getTransfer.js new file mode 100644 index 0000000..4a5bc7f --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getTransfer.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/{transfer_uuid} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L477 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getUserPortfolio.js b/examples/apidoc/CBInternationalClient/getUserPortfolio.js new file mode 100644 index 0000000..22814c4 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getUserPortfolio.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L266 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getUserPortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/getUserPortfolios.js b/examples/apidoc/CBInternationalClient/getUserPortfolios.js new file mode 100644 index 0000000..01146f1 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/getUserPortfolios.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L237 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getUserPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/setAutoMargin.js b/examples/apidoc/CBInternationalClient/setAutoMargin.js new file mode 100644 index 0000000..61d4e60 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/setAutoMargin.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/auto-margin-enabled + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L385 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setAutoMargin(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/setCrossCollateral.js b/examples/apidoc/CBInternationalClient/setCrossCollateral.js new file mode 100644 index 0000000..ee49f34 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/setCrossCollateral.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio}/cross-collateral-enabled + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L368 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setCrossCollateral(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/setPortfolioMarginOverride.js b/examples/apidoc/CBInternationalClient/setPortfolioMarginOverride.js new file mode 100644 index 0000000..6eb01a7 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/setPortfolioMarginOverride.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/margin + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L398 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.setPortfolioMarginOverride(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/submitOrder.js b/examples/apidoc/CBInternationalClient/submitOrder.js new file mode 100644 index 0000000..c422ac5 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/submitOrder.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L168 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/transferFundsBetweenPortfolios.js b/examples/apidoc/CBInternationalClient/transferFundsBetweenPortfolios.js new file mode 100644 index 0000000..5e76d6a --- /dev/null +++ b/examples/apidoc/CBInternationalClient/transferFundsBetweenPortfolios.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/transfer + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L410 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.transferFundsBetweenPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/transferPositionsBetweenPortfolios.js b/examples/apidoc/CBInternationalClient/transferPositionsBetweenPortfolios.js new file mode 100644 index 0000000..176b85b --- /dev/null +++ b/examples/apidoc/CBInternationalClient/transferPositionsBetweenPortfolios.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/transfer-position + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L422 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.transferPositionsBetweenPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/updateOpenOrder.js b/examples/apidoc/CBInternationalClient/updateOpenOrder.js new file mode 100644 index 0000000..5f2fdcb --- /dev/null +++ b/examples/apidoc/CBInternationalClient/updateOpenOrder.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/orders/{id} + // METHOD: PUT + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L199 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updateOpenOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/updatePortfolio.js b/examples/apidoc/CBInternationalClient/updatePortfolio.js new file mode 100644 index 0000000..bdd1a4b --- /dev/null +++ b/examples/apidoc/CBInternationalClient/updatePortfolio.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios/{portfolio} + // METHOD: PUT + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L275 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updatePortfolio(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/updatePortfolioParameters.js b/examples/apidoc/CBInternationalClient/updatePortfolioParameters.js new file mode 100644 index 0000000..06592cf --- /dev/null +++ b/examples/apidoc/CBInternationalClient/updatePortfolioParameters.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/portfolios + // METHOD: PATCH + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L255 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.updatePortfolioParameters(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/validateCounterpartyId.js b/examples/apidoc/CBInternationalClient/validateCounterpartyId.js new file mode 100644 index 0000000..90d7433 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/validateCounterpartyId.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/validate-counterparty-id + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L521 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.validateCounterpartyId(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/withdrawToCounterpartyId.js b/examples/apidoc/CBInternationalClient/withdrawToCounterpartyId.js new file mode 100644 index 0000000..7252fa7 --- /dev/null +++ b/examples/apidoc/CBInternationalClient/withdrawToCounterpartyId.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/withdraw/counterparty + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L532 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawToCounterpartyId(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBInternationalClient/withdrawToCryptoAddress.js b/examples/apidoc/CBInternationalClient/withdrawToCryptoAddress.js new file mode 100644 index 0000000..8b1428c --- /dev/null +++ b/examples/apidoc/CBInternationalClient/withdrawToCryptoAddress.js @@ -0,0 +1,21 @@ +const { CBInternationalClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /api/v1/transfers/withdraw + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBInternationalClient.ts#L486 + +const client = new CBInternationalClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.withdrawToCryptoAddress(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/cancelOrder.js b/examples/apidoc/CBPrimeClient/cancelOrder.js new file mode 100644 index 0000000..71d8e26 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/cancelOrder.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/orders/{order_id}/cancel + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L443 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.cancelOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createAddressBookEntry.js b/examples/apidoc/CBPrimeClient/createAddressBookEntry.js new file mode 100644 index 0000000..fdcddab --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createAddressBookEntry.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/address_book + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L300 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createAddressBookEntry(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createConversion.js b/examples/apidoc/CBPrimeClient/createConversion.js new file mode 100644 index 0000000..d5ae24e --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createConversion.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L523 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createConversion(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createPortfolioAllocations.js b/examples/apidoc/CBPrimeClient/createPortfolioAllocations.js new file mode 100644 index 0000000..ff48e97 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createPortfolioAllocations.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/allocations + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L64 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createPortfolioAllocations(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createPortfolioNetAllocations.js b/examples/apidoc/CBPrimeClient/createPortfolioNetAllocations.js new file mode 100644 index 0000000..56e2144 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createPortfolioNetAllocations.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/allocations/net + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L75 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createPortfolioNetAllocations(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createTransfer.js b/examples/apidoc/CBPrimeClient/createTransfer.js new file mode 100644 index 0000000..834465f --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createTransfer.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L551 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createTransfer(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createWallet.js b/examples/apidoc/CBPrimeClient/createWallet.js new file mode 100644 index 0000000..c18d05f --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createWallet.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L593 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createWallet(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/createWithdrawal.js b/examples/apidoc/CBPrimeClient/createWithdrawal.js new file mode 100644 index 0000000..2547130 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/createWithdrawal.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L564 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.createWithdrawal(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getActivities.js b/examples/apidoc/CBPrimeClient/getActivities.js new file mode 100644 index 0000000..7524bf6 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getActivities.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/activities + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L256 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getActivities(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getActivityById.js b/examples/apidoc/CBPrimeClient/getActivityById.js new file mode 100644 index 0000000..9939422 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getActivityById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/activities/{activity_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L266 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getActivityById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getAddressBook.js b/examples/apidoc/CBPrimeClient/getAddressBook.js new file mode 100644 index 0000000..a83b1e7 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getAddressBook.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/address_book + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L287 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAddressBook(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getAllocationById.js b/examples/apidoc/CBPrimeClient/getAllocationById.js new file mode 100644 index 0000000..12727ec --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getAllocationById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/allocations/{allocation_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L98 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAllocationById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getAssets.js b/examples/apidoc/CBPrimeClient/getAssets.js new file mode 100644 index 0000000..6c62426 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getAssets.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/entities/{entity_id}/assets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L150 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getAssets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getEntityPaymentMethod.js b/examples/apidoc/CBPrimeClient/getEntityPaymentMethod.js new file mode 100644 index 0000000..546b57c --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getEntityPaymentMethod.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/entities/{entity_id}/payment-methods/{payment_method_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L174 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEntityPaymentMethod(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getEntityPaymentMethods.js b/examples/apidoc/CBPrimeClient/getEntityPaymentMethods.js new file mode 100644 index 0000000..cc35ff6 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getEntityPaymentMethods.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/entities/{entity_id}/payment-methods + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L165 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getEntityPaymentMethods(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getInvoices.js b/examples/apidoc/CBPrimeClient/getInvoices.js new file mode 100644 index 0000000..51106c1 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getInvoices.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/entities/{entity_id}/invoices + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L134 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getInvoices(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getNetAllocationsByNettingId.js b/examples/apidoc/CBPrimeClient/getNetAllocationsByNettingId.js new file mode 100644 index 0000000..34600e4 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getNetAllocationsByNettingId.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/allocations/net/{netting_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L113 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getNetAllocationsByNettingId(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getOpenOrders.js b/examples/apidoc/CBPrimeClient/getOpenOrders.js new file mode 100644 index 0000000..6349cda --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getOpenOrders.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/open_orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L385 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOpenOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getOrderById.js b/examples/apidoc/CBPrimeClient/getOrderById.js new file mode 100644 index 0000000..37bbaef --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getOrderById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/orders/{order_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L430 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrderById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getOrderFills.js b/examples/apidoc/CBPrimeClient/getOrderFills.js new file mode 100644 index 0000000..dbdd88a --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getOrderFills.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/orders/{order_id}/fills + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L458 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrderFills(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getOrderPreview.js b/examples/apidoc/CBPrimeClient/getOrderPreview.js new file mode 100644 index 0000000..5449995 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getOrderPreview.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/order_preview + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L408 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getOrderPreview(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioAllocations.js b/examples/apidoc/CBPrimeClient/getPortfolioAllocations.js new file mode 100644 index 0000000..f6397d6 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioAllocations.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/allocations + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L86 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioAllocations(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioBalances.js b/examples/apidoc/CBPrimeClient/getPortfolioBalances.js new file mode 100644 index 0000000..7b4e685 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioBalances.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/balances + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L320 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioById.js b/examples/apidoc/CBPrimeClient/getPortfolioById.js new file mode 100644 index 0000000..6c4acc2 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L230 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioCommission.js b/examples/apidoc/CBPrimeClient/getPortfolioCommission.js new file mode 100644 index 0000000..cc194be --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioCommission.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/commission + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L370 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioCommission(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioCreditInformation.js b/examples/apidoc/CBPrimeClient/getPortfolioCreditInformation.js new file mode 100644 index 0000000..d9a61ee --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioCreditInformation.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/credit + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L239 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioCreditInformation(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioOrders.js b/examples/apidoc/CBPrimeClient/getPortfolioOrders.js new file mode 100644 index 0000000..0c6e7b5 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioOrders.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/orders + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L420 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioOrders(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioProducts.js b/examples/apidoc/CBPrimeClient/getPortfolioProducts.js new file mode 100644 index 0000000..2059b08 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioProducts.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/products + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L477 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioProducts(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioTransactions.js b/examples/apidoc/CBPrimeClient/getPortfolioTransactions.js new file mode 100644 index 0000000..9ffd148 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioTransactions.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/transactions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L493 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioTransactions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioUsers.js b/examples/apidoc/CBPrimeClient/getPortfolioUsers.js new file mode 100644 index 0000000..950282b --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioUsers.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/users + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L205 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioUsers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolioWallets.js b/examples/apidoc/CBPrimeClient/getPortfolioWallets.js new file mode 100644 index 0000000..edc32ec --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolioWallets.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L583 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolioWallets(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getPortfolios.js b/examples/apidoc/CBPrimeClient/getPortfolios.js new file mode 100644 index 0000000..544e4d5 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getPortfolios.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L221 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getPortfolios(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getTransactionById.js b/examples/apidoc/CBPrimeClient/getTransactionById.js new file mode 100644 index 0000000..06d8de2 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getTransactionById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/transactions/{transaction_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L508 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getTransactionById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getUsers.js b/examples/apidoc/CBPrimeClient/getUsers.js new file mode 100644 index 0000000..3a71c20 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getUsers.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/entities/{entity_id}/users + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L195 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getUsers(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getWalletBalance.js b/examples/apidoc/CBPrimeClient/getWalletBalance.js new file mode 100644 index 0000000..7251cb5 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getWalletBalance.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L334 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWalletBalance(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getWalletById.js b/examples/apidoc/CBPrimeClient/getWalletById.js new file mode 100644 index 0000000..9c99f95 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getWalletById.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id} + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L605 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWalletById(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getWalletDepositInstructions.js b/examples/apidoc/CBPrimeClient/getWalletDepositInstructions.js new file mode 100644 index 0000000..7eeff13 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getWalletDepositInstructions.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L620 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWalletDepositInstructions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getWalletTransactions.js b/examples/apidoc/CBPrimeClient/getWalletTransactions.js new file mode 100644 index 0000000..0d6555b --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getWalletTransactions.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L536 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWalletTransactions(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/getWeb3WalletBalances.js b/examples/apidoc/CBPrimeClient/getWeb3WalletBalances.js new file mode 100644 index 0000000..4375dfb --- /dev/null +++ b/examples/apidoc/CBPrimeClient/getWeb3WalletBalances.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances + // METHOD: GET + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L349 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.getWeb3WalletBalances(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + }); diff --git a/examples/apidoc/CBPrimeClient/submitOrder.js b/examples/apidoc/CBPrimeClient/submitOrder.js new file mode 100644 index 0000000..3bc1317 --- /dev/null +++ b/examples/apidoc/CBPrimeClient/submitOrder.js @@ -0,0 +1,21 @@ +const { CBPrimeClient } = require('coinbase-api'); + + // This example shows how to call this coinbase API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "coinbase-api" for coinbase exchange + // This coinbase API SDK is available on npm via "npm install coinbase-api" + // ENDPOINT: /v1/portfolios/{portfolio_id}/order + // METHOD: POST + // PUBLIC: NO + // Link to function: https://github.com/tiagosiebler/coinbase-api/blob/master/src/CBPrimeClient.ts#L395 + +const client = new CBPrimeClient({ + apiKey: 'insert_api_key_here', + apiSecret: 'insert_api_secret_here', +}); + +client.submitOrder(params) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.error(error); + });