- useKadoQuoteSWR(asset, blockchain, amountUsd, enabled?, options?): {
data: undefined | {
error: string;
success: false;
} | {
quote: KadoResponseQuote;
request: KadoRequestQuoteArgs;
success: true;
};
error: any;
isLoading: boolean;
isValidating: boolean;
refresh: (() => Promise<any>);
} Parameters
- asset: undefined | string
- blockchain: undefined | string
- amountUsd: undefined | number
- enabled: boolean = true
- options: Partial<PublicConfiguration<any, any, BareFetcher<any>>> = {}
Returns {
data: undefined | {
error: string;
success: false;
} | {
quote: KadoResponseQuote;
request: KadoRequestQuoteArgs;
success: true;
};
error: any;
isLoading: boolean;
isValidating: boolean;
refresh: (() => Promise<any>);
}
data: undefined | {
error: string;
success: false;
} | {
quote: KadoResponseQuote;
request: KadoRequestQuoteArgs;
success: true;
}
error: any
isLoading: boolean
isValidating: boolean
refresh: (() => Promise<any>)
- (): Promise<any>
Returns Promise<any>
React hook to get a quote for Crypto -> Fiat conversion from Kado API