Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BityApiClientInterface

The Bity API client interface that abstracts all Bity services.

Hierarchy

  • BityApiClientInterface

Index

Properties

createOrder

createOrder: function

Type declaration

    • (order: PreparedOrder): Promise<URL>
    • Parameters

      • order: PreparedOrder

      Returns Promise<URL>

fetchCurrencies

fetchCurrencies: function

Get information on currencies.

param

Get information on a specific currency.

param

See https://doc.bity.com/exchange/v2.html#bity-exchange-api-currencies for options.

Type declaration

    • (specificCurrency?: CurrencyCode, options?: KeyValues): Promise<Currency[]>
    • Parameters

      • Optional specificCurrency: CurrencyCode
      • Optional options: KeyValues

      Returns Promise<Currency[]>

fetchEstimateForOrder

fetchEstimateForOrder: function

Get an estimate for an order. Takes a prepared order object created with Order.generateObjectForOrderCreation(). See @bity/models for details.

returns

An Order object with the estimated values.

Type declaration

    • (order: PreparedOrder): Promise<Order>
    • Parameters

      • order: PreparedOrder

      Returns Promise<Order>

fetchExchangeRates

fetchExchangeRates: function

Type declaration

    • (): Promise<PairRate[]>
    • Returns Promise<PairRate[]>

fetchExchangeRatesHistory

fetchExchangeRatesHistory: function

Type declaration

    • (): Promise<ExchangeRateHistory[]>
    • Returns Promise<ExchangeRateHistory[]>

fetchOrderWithId

fetchOrderWithId: function

Type declaration

    • (orderRef: OrderReference): Promise<OrderPaymentDetailsAll>
    • Parameters

      • orderRef: OrderReference

      Returns Promise<OrderPaymentDetailsAll>

fetchOrderWithUrl

fetchOrderWithUrl: function

Type declaration

    • (orderUrl: URL): Promise<OrderPaymentDetailsAll>
    • Parameters

      • orderUrl: URL

      Returns Promise<OrderPaymentDetailsAll>

fetchPairs

fetchPairs: function

Get information on pairs.

param

See https://doc.bity.com/exchange/v2.html#list-currency-pairs for options.

Type declaration

    • Parameters

      Returns Promise<Pair[]>

verifySignature

verifySignature: function
param

This is the URL to submit the signature to. It's unique, so that's why a new one is given for each order.

param

A signature formatted according to the cryptocurrency being used in the trade. For example, Ethereum signature are string-hex-encoded, starting with a '0x' followed by all the hex characters. Bitcoin is base58 encoded. Other currencies will have their own encoding schemes.

returns

A resolved or rejected promise, which corresponds to a successful or failed verification.

Type declaration

    • (relativeUrlReturnedByOrderPaymentDetails: URL, signature: string): Promise<void>
    • Parameters

      • relativeUrlReturnedByOrderPaymentDetails: URL
      • signature: string

      Returns Promise<void>

Generated using TypeDoc