diff --git a/src/account/AccountAPI.ts b/src/account/AccountAPI.ts index e29de504..eadc17e5 100644 --- a/src/account/AccountAPI.ts +++ b/src/account/AccountAPI.ts @@ -141,7 +141,7 @@ export class AccountAPI { * * @param accountId - Account ID belonging to the API key’s profile * @param pagination - Pagination field - * @see https://docs.pro.coinbase.com/#get-account-history + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountledger */ async getAccountHistory(accountId: string, pagination?: Pagination): Promise> { const resource = `${AccountAPI.URL.ACCOUNTS}/${accountId}/ledger`; @@ -162,7 +162,7 @@ export class AccountAPI { * * @param accountId - Account ID belonging to the API key’s profile * @param pagination - Pagination field - * @see https://docs.pro.coinbase.com/#get-holds + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccountholds */ async getHolds(accountId: string, pagination?: Pagination): Promise> { const resource = `${AccountAPI.URL.ACCOUNTS}/${accountId}/holds`; @@ -179,7 +179,7 @@ export class AccountAPI { /** * Get a list of trading accounts from the profile of the API key. * - * @see https://docs.pro.coinbase.com/#list-accounts + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts */ async listAccounts(): Promise { const resource = AccountAPI.URL.ACCOUNTS; @@ -190,7 +190,7 @@ export class AccountAPI { /** * Get a list of your coinbase accounts. * - * @see https://docs.pro.coinbase.com/#coinbase-accounts + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcoinbaseaccounts */ async listCoinbaseAccounts(): Promise { const resource = AccountAPI.URL.COINBASE_ACCOUNT; diff --git a/src/client/RESTClient.ts b/src/client/RESTClient.ts index 5426b76c..9537daba 100644 --- a/src/client/RESTClient.ts +++ b/src/client/RESTClient.ts @@ -82,7 +82,7 @@ export class RESTClient extends EventEmitter { * Rate limits: * - 3 requests per second, up to 6 requests per second in bursts for public endpoints * - 5 requests per second, up to 10 requests per second in bursts for private endpoints - * @see https://docs.pro.coinbase.com/#rate-limits + * @see https://docs.cloud.coinbase.com/exchange/docs/rate-limits */ return 1000; }, diff --git a/src/client/WebSocketClient.ts b/src/client/WebSocketClient.ts index c79a34c9..67520862 100644 --- a/src/client/WebSocketClient.ts +++ b/src/client/WebSocketClient.ts @@ -376,7 +376,7 @@ export class WebSocketClient extends EventEmitter { * * @param reconnectOptions - Reconnect options to be used with the "reconnecting-websocket" package. Note: Options * will be merged with sensible default values. - * @see https://docs.pro.coinbase.com/#websocket-feed + * @see https://docs.cloud.coinbase.com/exchange/docs/websocket-overview */ connect(reconnectOptions?: Options): ReconnectingWebSocket { if (this.socket) { @@ -485,7 +485,7 @@ export class WebSocketClient extends EventEmitter { * Authentication will result in a couple of benefits: * 1. Messages where you're one of the parties are expanded and have more useful fields * 2. You will receive private messages, such as lifecycle information about stop orders you placed - * @see https://docs.pro.coinbase.com/#subscribe + * @see https://docs.cloud.coinbase.com/exchange/docs/websocket-overview#subscribe */ const signature = await this.signRequest({ httpMethod: 'GET', diff --git a/src/currency/CurrencyAPI.ts b/src/currency/CurrencyAPI.ts index 49fab4cd..28cf66ae 100644 --- a/src/currency/CurrencyAPI.ts +++ b/src/currency/CurrencyAPI.ts @@ -38,7 +38,7 @@ export class CurrencyAPI { * Currency codes will conform to the ISO 4217 standard where possible. * Currencies which have or had no representation in ISO 4217 may use a custom code. * - * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-currencies + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies */ async listCurrencies(): Promise { const resource = CurrencyAPI.URL.CURRENCIES; diff --git a/src/fee/FeeAPI.ts b/src/fee/FeeAPI.ts index 0d346447..5e042df1 100644 --- a/src/fee/FeeAPI.ts +++ b/src/fee/FeeAPI.ts @@ -25,8 +25,7 @@ export class FeeAPI { * Get your current maker & taker fee rates, as well as your 30-day trailing volume. Quoted rates are subject to * change. * - * @see https://docs.pro.coinbase.com/#fees - * @see https://help.coinbase.com/en/pro/trading-and-funding/trading-rules-and-fees/fees.html + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees */ async getCurrentFees(): Promise { const resource = FeeAPI.URL.FEES; diff --git a/src/fill/FillAPI.ts b/src/fill/FillAPI.ts index 7a745dc6..1b5d3896 100644 --- a/src/fill/FillAPI.ts +++ b/src/fill/FillAPI.ts @@ -34,8 +34,7 @@ export class FillAPI { * * @param orderId - ID of previously placed order * @param pagination - Pagination field - * @see https://docs.pro.coinbase.com/#list-fills - * @see https://pro.coinbase.com/orders/filled + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfills */ async getFillsByOrderId(orderId: string, pagination?: Pagination): Promise> { const resource = FillAPI.URL.FILLS; @@ -54,8 +53,7 @@ export class FillAPI { * * @param productId - Representation for base and counter * @param pagination - Pagination field - * @see https://docs.pro.coinbase.com/#list-fills - * @see https://pro.coinbase.com/orders/filled + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfills */ async getFillsByProductId(productId: string, pagination?: Pagination): Promise> { const resource = FillAPI.URL.FILLS; diff --git a/src/order/OrderAPI.ts b/src/order/OrderAPI.ts index 0e380871..57270c65 100644 --- a/src/order/OrderAPI.ts +++ b/src/order/OrderAPI.ts @@ -95,7 +95,7 @@ export interface FilledOrder extends BasePlacedOrder { status: OrderStatus.DONE; } -/** @see https://docs.pro.coinbase.com/#list-orders */ +/** @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders */ export interface OrderListQueryParam extends Pagination { /** Only list orders for a specific product. */ product_id?: string; @@ -117,7 +117,7 @@ export class OrderAPI { * * @param productId - Representation for base and counter * @returns A list of ids of the canceled orders - * @see https://docs.pro.coinbase.com/#cancel-all + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorders */ async cancelOpenOrders(productId?: string): Promise { const resource = OrderAPI.URL.ORDERS; @@ -133,7 +133,7 @@ export class OrderAPI { * @param orderId - ID of the order to cancel * @param productId - While not required, the request will be more performant if you include the product ID * @returns The ID of the canceled order - * @see https://docs.pro.coinbase.com/#cancel-an-order + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_deleteorder */ async cancelOrder(orderId: string, productId?: string): Promise { const resource = `${OrderAPI.URL.ORDERS}/${orderId}`; @@ -150,7 +150,7 @@ export class OrderAPI { * @note Depending on your activity, fetching all data from this endpoint can take very long (measured already 25 * seconds!) * @param query - Available query parameters (Pagination, Product ID and/or Order Status) - * @see https://docs.pro.coinbase.com/#list-orders + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders */ async getOrders(query?: OrderListQueryParam): Promise> { const resource = OrderAPI.URL.ORDERS; @@ -171,7 +171,7 @@ export class OrderAPI { * Get a single order by order id from the profile that the API key belongs to. * * @param orderId - ID of previously placed order - * @see https://docs.pro.coinbase.com/#get-an-order + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder */ async getOrder(orderId: string): Promise { const resource = `${OrderAPI.URL.ORDERS}/${orderId}`; @@ -196,7 +196,7 @@ export class OrderAPI { * funds. Once an order is placed, your account funds will be put on hold for the duration of the order. * * @param newOrder - Order type and parameters - * @see https://docs.pro.coinbase.com/#place-a-new-order + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postorders */ async placeOrder(newOrder: NewOrder): Promise { const resource = OrderAPI.URL.ORDERS; diff --git a/src/product/ProductAPI.ts b/src/product/ProductAPI.ts index 3f9cbbc0..5481b7de 100644 --- a/src/product/ProductAPI.ts +++ b/src/product/ProductAPI.ts @@ -200,7 +200,7 @@ export class ProductAPI { * * @param productId - Representation for base and counter * @param [params] - Desired timespan - * @see https://docs.pro.coinbase.com/#get-historic-rates + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductcandles */ async getCandles(productId: string, params: HistoricRateRequest): Promise { const resource = `${ProductAPI.URL.PRODUCTS}/${productId}/candles`; @@ -281,7 +281,7 @@ export class ProductAPI { /** * Get trading details for a specified product. * - * @see https://docs.pro.coinbase.com/#get-products + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproduct */ async getProduct(productId: string): Promise { const resource = `${ProductAPI.URL.PRODUCTS}/${productId}`; @@ -292,7 +292,7 @@ export class ProductAPI { /** * Get trading details of all available products. * - * @see https://docs.pro.coinbase.com/#get-products + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts */ async getProducts(): Promise { const resource = ProductAPI.URL.PRODUCTS; @@ -301,11 +301,11 @@ export class ProductAPI { } /** - * Get latest trades for a product. + * Get the latest trades for a product. * * @param productId - Representation for base and counter * @param pagination - Pagination field - * @see https://docs.pro.coinbase.com/#get-trades + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducttrades */ async getTrades(productId: string, pagination?: Pagination): Promise> { const resource = `${ProductAPI.URL.PRODUCTS}/${productId}/trades`; @@ -325,7 +325,7 @@ export class ProductAPI { * * @param productId - Representation for base and counter * @param params - Amount of detail - * @see https://docs.pro.coinbase.com/#get-product-order-book + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductbook */ async getProductOrderBook( productId: string, @@ -364,7 +364,7 @@ export class ProductAPI { * Get latest 24 hours of movement data for a product. * * @param productId - Representation for base and counter - * @see https://docs.pro.coinbase.com/#get-24hr-stats + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductstats */ async getProductStats(productId: string): Promise { const resource = `${ProductAPI.URL.PRODUCTS}/${productId}/stats`; @@ -376,7 +376,7 @@ export class ProductAPI { * Get snapshot information about the last trade (tick), best bid/ask and 24h volume. * * @param productId - Representation for base and counter - * @see https://docs.pro.coinbase.com/#get-product-ticker + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproductticker */ async getProductTicker(productId: string): Promise { const resource = `${ProductAPI.URL.PRODUCTS}/${productId}/ticker`; diff --git a/src/profile/ProfileAPI.ts b/src/profile/ProfileAPI.ts index a3d95c0a..3a97f10c 100644 --- a/src/profile/ProfileAPI.ts +++ b/src/profile/ProfileAPI.ts @@ -31,7 +31,7 @@ export class ProfileAPI { * This endpoint requires the “view” permission and is accessible by any profile’s API key. * * @param active - Only return active profiles if set true - * @see https://docs.pro.coinbase.com/#list-profiles + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getprofiles */ async listProfiles(active?: true): Promise { const resource = ProfileAPI.URL.PROFILES; @@ -52,6 +52,7 @@ export class ProfileAPI { * This endpoint requires the “view” permission and is accessible by any profile’s API key. * * @param profileId - Profile ID + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getprofile * @returns A single profile */ async getProfile(profileId: string): Promise { @@ -72,7 +73,7 @@ export class ProfileAPI { * Transfer funds from API key’s profile to another user owned profile. * This endpoint requires the “transfer” permission. * - * @see https://docs.pro.coinbase.com/#create-profile-transfer + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postprofiletransfer */ async transferFunds(transfer: FundTransfer): Promise { const resource = `${ProfileAPI.URL.PROFILES}/transfer`; diff --git a/src/transfer/TransferAPI.ts b/src/transfer/TransferAPI.ts index 9c47a728..3a34e994 100644 --- a/src/transfer/TransferAPI.ts +++ b/src/transfer/TransferAPI.ts @@ -45,8 +45,7 @@ export class TransferAPI { * Get a list of deposits/withdrawals from the profile of the API key, in descending order by created time. * * @param pagination - Pagination field - * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-deposits#list-deposits - * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-withdrawals#list-withdrawals + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers */ async getTransfers( transferType: TransferType, @@ -81,8 +80,7 @@ export class TransferAPI { * Get information on a single deposit/withdrawal. * * @param transferId - id of the requested resource - * @see https://docs.pro.coinbase.com/#single-deposit - * @see https://docs.pro.coinbase.com/#single-withdrawal + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfer */ async getTransfer(transferId: string): Promise { const resource = `${TransferAPI.URL.TRANSFERS}/${transferId}`; diff --git a/src/withdraw/WithdrawAPI.ts b/src/withdraw/WithdrawAPI.ts index 6b1ce1d2..8538bcee 100644 --- a/src/withdraw/WithdrawAPI.ts +++ b/src/withdraw/WithdrawAPI.ts @@ -88,7 +88,7 @@ export class WithdrawAPI { * @param destinationTag - A destination tag for currencies that support one * @param addNetworkFeeToTotal - A boolean flag to add the network fee on top of the amount. * If this is blank, it will default to deducting the network fee from the amount. - * @see https://docs.pro.coinbase.com/#crypto + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcrypto */ async withdrawToCryptoAddress( amount: string, @@ -120,7 +120,7 @@ export class WithdrawAPI { * @param amount - The amount to withdraw * @param currency - The type of currency * @param coinbaseAccountId - ID of the Coinbase or Coinbase Pro account - * @see https://docs.pro.coinbase.com/#coinbase56 + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount */ async withdrawToCoinbaseAccount( amount: string, @@ -143,7 +143,7 @@ export class WithdrawAPI { * @param amount - The amount to withdraw * @param currency - The type of currency * @param paymentMethodId - ID of the payment method - * @see https://docs.pro.coinbase.com/#payment-method55 + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod */ async withdrawToPaymentMethod( amount: string, @@ -165,7 +165,7 @@ export class WithdrawAPI { * * @param currency - The type of currency * @param cryptoAddress - A crypto address of the recipient - * @see https://docs.pro.coinbase.com/#fee-estimate + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getwithdrawfeeestimate */ async getFeeEstimate(currency: string, cryptoAddress: string): Promise { const resource = WithdrawAPI.URL.WITHDRAWALS.FEE_ESTIMATE; @@ -178,7 +178,7 @@ export class WithdrawAPI { /** * Get a list of your payment methods. * - * @see https://docs.pro.coinbase.com/#list-payment-methods + * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getpaymentmethods */ async getPaymentMethods(): Promise { const resource = WithdrawAPI.URL.LIST_PAYMENT_METHODS;