Skip to main content

Interface: OnramperWidgetRequest

The request of Onramper.generateWidgetUrl: the fields of the swap backend's GenerateWidgetUrlDto, no others (the backend refuses a field it does not know). A field left out is the backend's default (mode buy, defaultFiat USD, defaultAmount 100, sellDefaultAmount 1, onlyCryptoNetworks gala, defaultPaymentMethod creditcard, networkPrefix gala_gala).

Properties​

PropertyTypeDescription
defaultAmount?numberThe fiat amount the widget opens with (the backend accepts 15 to 15 000, at most 2 decimals).
defaultCrypto?string-
defaultFiat?string-
defaultPaymentMethod?string-
excludeFiat?string-
excludePaymentMethods?string-
isAddressEditable?string-
mode?"swap" | "buy" | "sell"-
networkPrefix?string-
onlyCryptoNetworks?string-
onlyFiat?string-
onlyPaymentMethods?string-
sellDefaultAmount?numberThe crypto amount a sell opens with (0.000001 to 1 000 000, at most 18 decimals).
walletAddressstringThe wallet that receives the crypto, sent as given (the backend accepts 0x… or eth|… Ethereum addresses and client|… aliases, and canonicalizes them).