Skip to content

Commit

Permalink
Merge pull request #298 from LedgerHQ/sell-rate
Browse files Browse the repository at this point in the history
chore: changed sell rate example
  • Loading branch information
mstorozhenko-ledger authored Oct 31, 2024
2 parents bf3da85 + 862ed97 commit 1209e48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pages/docs/ledger-live/exchange/card/providers-liveapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ This method will need you to provide the following parameters:
* `fromAccountId`: User's Ledger account id.
* `fromAmount`: Amount that will be sold.
* `toFiat`: Fiat currency that the user wants to be paid with using provider id.
* `rate`: The rate of the fund.
* `rate`: The crypto/fiat rate.

```js copy
exchangeSDK.sell({
quoteId: "123abc",
fromAccountId: "97f06be9-6fb2-5da3-be71-4e762ed6e115",// Ledger Live uuid4 account (can be a BTC account)
fromAmount: new BigNumber(1),
toFiat: "EUR", // provider fiat id
rate: 90000, // crypto/fiat rate [BTC/EUR]
rate: 66564, // crypto/fiat rate [BTC/EUR]
type: "card"
});
```
Expand Down
6 changes: 3 additions & 3 deletions pages/docs/ledger-live/exchange/sell/providers-liveapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ This method will need you to provide the following parameters:
* `fromAccountId`: User's Ledger account id, [previously given to the LiveApp](./providers-liveapp) as a query parameter.
* `fromAmount`: Amount that will be sold.
* `toFiat`: Fiat currency that the user wants to be paid with using provider id.
* `rate`: The rate of the sell.
* `rate`: The crypto/fiat rate.

```js copy
exchangeSDK.sell({
quoteId: "123abc",
fromAccountId: "97f06be9-6fb2-5da3-be71-4e762ed6e115",// Ledger Live uuid4 account (can be a BTC account)
fromAmount: new BigNumber(1),
toFiat: "EUR", // provider fiat id
rate: 90000, // crypto/fiat rate [BTC/EUR]
rate: 66564, // crypto/fiat rate [BTC/EUR]
type: "sell"
});
```
Expand All @@ -45,7 +45,7 @@ This method will need you to provide the following parameters:

The LiveApp needs to respond to a URL with some parameters. LiveApp URLs are used to open your LiveApp with the quote values that the user already entered in Ledger Live.

The LiveApp URL format is already fixed and will depend on the information you provided inside your [LiveApp manifest](../../../../docs/discover/wallet-api/appendix/manifest) (ex: `ledgerlive://discover/swapprovidername`).
The LiveApp URL format is already fixed and will depend on the information you provided inside your [LiveApp manifest](../../../../docs/discover/wallet-api/appendix/manifest) (ex: `ledgerlive://discover/sellprovidername`).


* `account-id`: User’s selected account id, where the crypto he wants to sell is stored.
Expand Down

0 comments on commit 1209e48

Please sign in to comment.