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

Mostro listorders #1

Merged
merged 3 commits into from
Jan 18, 2023
Merged

Mostro listorders #1

merged 3 commits into from
Jan 18, 2023

Conversation

arkanoider
Copy link
Collaborator

This is a first draft for CLI mostro listorders, take a look.

I created a CLAP command listorders:
`Usage: mostro-cli [OPTIONS] [COMMAND]

Commands:
listorders Requests open orders from mostro pubkey ()
help Print this message or the help of the given subcommand(s)

Options:
-v, --verbose
-h, --help Print help information
-V, --version Print version information`

The command exit at the end after collecting all the offers from the requested mostro pubkey, so imo I used a command with exit approach.
The result is the same that you saw on mostro side:
Istantanea_2023-01-16_21-58-25

Let me know if you like it!

Copy link
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this contribution

@grunch grunch merged commit 5740da4 into MostroP2P:main Jan 18, 2023
@arkanoider
Copy link
Collaborator Author

You're welcome @grunch , really a pleasure. We could speak about some other commands to implement to make cli more configurable. Some ideas:

  • Add relay with command.
  • Use of a config file to load relay and mostro pub key to request.

Any idea that you like to have on cli side?

@grunch
Copy link
Member

grunch commented Jan 18, 2023

I already added a .env file where we can add mostro's pubkey, user private key, we can add relays there too

@grunch
Copy link
Member

grunch commented Jan 18, 2023

I think is good to have the listorders command but users will need at some point to filter by order kind (buy/sell) and fiat currency

@arkanoider
Copy link
Collaborator Author

I think is good to have the listorders command but users will need at some point to filter by order kind (buy/sell) and fiat currency

For sure, adding some filter is not so complicated i think, could be next improve of list orders.

@arkanoider arkanoider deleted the mostro_listorders branch January 19, 2023 20:11
@arkanoider
Copy link
Collaborator Author

Hi @grunch i am refining some cosmetics on table: green text for buy and red for sell, centering text and maybe if it has a meaning adding the relays where an offer is present.

Adding some filtering to test: easy one for currency ticker for example. What do you say about some args of subcommand listorder, for example:

mostro-cli listorders -c(urrency) USD

this will filter orders for currency ticker. Have you better idea for cli? We could make an arg for the filter we want, so -o(rdertype) could be buy or sell...and so on.

@grunch
Copy link
Member

grunch commented Jan 20, 2023

sounds good, let's move this conversation to new issues, I will create a few

@grunch
Copy link
Member

grunch commented Jan 20, 2023

#2

grunch pushed a commit that referenced this pull request Feb 28, 2023
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