Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exchange transaction method #52

Merged
merged 1 commit into from
Oct 26, 2021
Merged

Add exchange transaction method #52

merged 1 commit into from
Oct 26, 2021

Conversation

johnmaia
Copy link
Contributor

This PR adds the exchange transaction method.

That accepts the following parameters:

  • baseAmount (required)
  • baseAssetCode (required)
  • code
  • commit
  • customData
  • description
  • destinationAddress
  • externalId
  • externalReference
  • originAddress
  • quoteAmount (if given, then rate should not be included)
  • quoteAssetCode (required)
  • rate (if given, then quoteAmount should not be included)
  • walletId (required)

If the quoteAmount and rate are not given on the creation, the exchange will accept those values when approving the transaction. In case the code is set to internal and the quoteAmount and rate are not given on the creation, the exchange will use the domain's rate for the given currency pair (baseAssetCode/quoteAssetCode) if it exists.

If the quoteAmount or rate are given or retrieve from the domain's rate (in case of the internal exchange) the transaction will be automatically approved. If the commit is also sent as true then the transaction will be approved and then automatically confirmed.

@johnmaia johnmaia requested a review from joaonice October 21, 2021 14:20
@joaonice joaonice merged commit 3a6b584 into master Oct 26, 2021
@joaonice joaonice deleted the feature/exchange branch October 26, 2021 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants