import { DataResponse } from './response/payload/common/data.response'; import { AddressResponse } from './response/payload/address/address.response'; import { PaginatedDataResponse } from './response/payload/common/paginated-data.response'; import { AccountResponse } from './response/payload/account/account.response'; import { PaginateQuery } from './request/query/paginate.query'; import { RequestMakerInterface } from './request/maker/request-maker.interface'; import { ExchangeRateResponse } from './response/payload/exchange-rate/exchange-rate.response'; import { PaginatedTransactionResponse } from './response/payload/transaction/paginated-transaction.response'; import { TransactionResponse } from './response/payload/transaction/transaction.response'; import { PaginatedPaymentMethodResponse } from './response/payload/payment/paginated-payment-method.response'; import { PaymentMethodResponse } from './response/payload/payment/payment-method.response'; import { FiatCurrenciesResponse } from './response/payload/fiat-currencies/fiat-currencies.response'; import { TimeResponse } from './response/payload/time/time.response'; import { PriceResponse } from './response/payload/price/price.response'; import { PaginatedBuyResponse } from './response/payload/buy/paginated-buy.response'; import { BuyResponse } from './response/payload/buy/buy.response'; import { PaginatedSellResponse } from './response/payload/sell/paginated-sell.response'; import { SellResponse } from './response/payload/sell/sell.response'; import { CryptoCurrenciesResponse } from './response/payload/crypto-currencies/crypto-currencies.response'; export declare class CoinbaseClient { private requestMaker; constructor(requestMaker: RequestMakerInterface); /** * Get current exchange rates. Default base currency is USD but it can be defined as any supported currency (see Currencies endpoint). * Returned rates will define the exchange rate for one unit of the base currency. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-exchange-rates#get-exchange-rates */ getExchangeRates(currency: string): Promise>; /** * List a current user's accounts to which the authentication method has access to. * * Permissions * This endpoint requires the "wallet:accounts:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts */ listAccounts(paginateQuery?: PaginateQuery): Promise>; /** * Show (or get) a current user's account. To access the primary account for a given currency, a currency string (e.g., BTC or ETH) can be used instead of the account ID in the URL. * * Permissions * This endpoint requires the "wallet:accounts:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#show-an-account */ showAccount(accountId: string): Promise>; /** * Modify a user's account. * * Permissions * This endpoint requires the "wallet:accounts:update" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#update-account */ updateAccount(accountId: string, name: string): Promise>; /** * Remove a user's account. You cannot remove: * * - Primary accounts * - Accounts with non-zero balance * - Fiat accounts * - Vaults with a pending withdrawal * * Permissions * This endpoint requires the "wallet:accounts:delete" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#delete-account */ deleteAccount(accountId: string): Promise; /** * Creates a new address for an account. Addresses can be created for wallet account types. * * Permissions * This endpoint requires the "wallet:addresses:create" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#create-address */ createAddress(accountId: string, name?: string): Promise>; /** * Get a single address for an account. A regular cryptocurrency address can be used in place of address_id but the address must be associated with the correct account. * * Permissions * This endpoint requires the "wallet:addresses:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses#show-address */ showAddress(accountId: string, addressId: string): Promise>; /** * List transactions that have been sent to a specific address. A regular cryptocurrency address can be used in place of address_id but the address must be associated with the correct account. * * Permissions * This endpoint requires the "wallet:transactions:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#list-transactions **/ listTransactions(accountId: string, paginateQuery?: PaginateQuery): Promise>; /** * Get a single address for an account. A regular cryptocurrency address can be used in place of address_id but the address must be associated with the correct account. * * Permissions * This endpoint requires the "wallet:addresses:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#show-a-transaction */ showTransaction(accountId: string, transactionId: string): Promise>; /** * Send funds to a network address for any Coinbase supported asset, or email address of the recipient. No transaction fees are required for off-blockchain cryptocurrency transactions. * * Coinbase recommends that you always supply a unique idem field for each transaction. * * Permissions * This endpoint requires the "wallet:transactions:send" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money */ sendMoney(accountId: string, to: string, amount: string, currency: string, options?: { idem?: string; toFinancialInstitution?: boolean; financialInstitutionWebsite?: string; memo?: string; description?: string; skipNotifications?: boolean; destinationTag?: string; }): Promise>; /** * Transfer any Coinbase supported digital asset between two of a single user's accounts. The following transfers are allowed: * * Permissions * This endpoint requires the "wallet:transactions:transfer" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#transfer-money-between-accounts */ transferMoney(accountId: string, to: string, amount: string, currency: string, description?: string): Promise>; /** * Lists the current user's payment methods. * * Permissions * This endpoint requires the "wallet:payment-methods:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-payment-methods#list-payment-methods */ listPaymentMethods(paginateQuery?: PaginateQuery): Promise>; /** * Get a single payment method (of the current user) by payment method ID. * * Permissions * This endpoint requires the "wallet:payment-methods:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-payment-methods#show-a-payment-method */ showPaymentMethod(paymentMethodId: string): Promise>; /** * Lists known fiat currencies. Currency codes conform to the ISO 4217 standard where possible. Currencies with no representation in ISO 4217 may use a custom code. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-fiat-currencies */ getFiatCurrencies(): Promise>; /** * Lists known cryptocurrencies. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-currencies#get-cryptocurrencies */ getCryptoCurrencies(): Promise>; /** * Get the API server time. * * Permissions * This endpoint does not require any permission. */ getCurrentTime(): Promise>; /** * Get the total price to buy one bitcoin or ether. * * Note that exchange rates fluctuates so the price is only correct for seconds at the time. This buy price includes standard Coinbase fee (1%) but excludes any other fees including bank fees. * If you need more accurate price estimate for a specific payment method or amount, see buy bitcoin endpoint and quote: true option. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-buy-price */ getBuyPrice(currencyPair: string): Promise>; /** * Get the total price to sell one bitcoin or ether. * * Note that exchange rates fluctuates so the price is only correct for seconds at the time. This sell price includes standard Coinbase fee (1%) but excludes any other fees including bank fees. * If you need more accurate price estimate for a specific payment method or amount, see sell bitcoin endpoint and quote: true option. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-sell-price */ getSellPrice(currencyPair: string): Promise>; /** * Get the current market price for bitcoin. This is usually somewhere in between the buy and sell price. * * Note that exchange rates fluctuates so the price is only correct for seconds at the time. * * You can also get historic prices with date parameter. * * Permissions * This endpoint does not require any permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price */ getSpotPrice(currencyPair: string, date?: Date): Promise>; /** * Lists buys for an account. * * Permissions * This endpoint requires the "wallet:buys:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#list-buys */ listBuys(paginateQuery?: PaginateQuery): Promise>; /** * Show an individual buy. * * Permissions * This endpoint requires the "wallet:buys:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#show-a-buy */ showBuy(buyId: string): Promise>; /** * Buys a user-defined amount of any Coinbase supported asset. * * Permissions * This endpoint requires the "wallet:buys:create" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#place-buy-order */ placeBuy(amount: string, currency: string, paymentMethodId: string, options?: { commit?: boolean; quote?: string; agree_btc_amount_varies?: boolean; }): Promise>; /** * Completes a buy that is created in commit: false state. * * If the exchange rate has changed since the buy was created, this call will fail with the error “The exchange rate updated while you were waiting. The new total is shown below”. * * The buy's total will also be updated. You can repeat the /commit call to accept the new values and start the buy at the new rates. * * Permissions * This endpoint requires the "wallet:buys:create" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-buys#commit-a-buy */ commitBuy(buyId: string): Promise>; /** * Lists sells for an account. * * Permissions * This endpoint requires the "wallet:sells:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#list-sells */ listSells(paginateQuery?: PaginateQuery): Promise>; /** * Show an individual sell. * * Permissions * This endpoint requires the "wallet:sells:read" permission. * * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-sells#show-a-sell */ showSell(sellId: string): Promise>; }