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 further fields to swap endpoint #1815

Open
janmichek opened this issue Jun 19, 2024 · 2 comments
Open

Add further fields to swap endpoint #1815

janmichek opened this issue Jun 19, 2024 · 2 comments
Assignees

Comments

@janmichek
Copy link

Please add following fields to
/dex/swaps

action: [BUY | SELL | SWAP]
fromContract: [contractId]
toContract: [contractId]
fromAmount: [number]
toAmount: [number]
fromDecimals: [number]
toDecimals: [number]
microtime(of the tx): [time]
height (of the tx): [number]

also please document the API docs

@vatanasov
Copy link
Contributor

@janmichek can you elaborate on:

  1. What do you mean by the action field? Which swaps do you consider buy/sell?
  2. With fromContract and toContract do you mean the sender and receiver accountPK?

@janmichek
Copy link
Author

1. What do you mean by the `action` field? Which swaps do you consider buy/sell?

I think you will get it by the entrypoint swap_exact_ae_for_tokens in this case th_2MZcRcm9Rcjf6HFoxjtHgPVAQSLurLQSFqJ6zjZew5sk7jPU7u

2. With `fromContract` and `toContract` do you mean the sender and receiver accountPK?

By this I mean the token contract adresses

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

No branches or pull requests

2 participants