trading_agent.client.proposal_commands
¶
The trading-agent proposals commands: list, show, accept and reject.
Typical usage example:
exit_code = ProposalCommands(store).run('list', None)
ProposalCommands
¶
Prints and changes proposals for the user.
Creates the commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
store
|
ProposalStore
|
Where the proposals are. |
required |
output
|
TextIO
|
Where to print. |
stdout
|
Source code in src/trading_agent/client/proposal_commands.py
run
¶
Runs one action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
str
|
"list", "show", "accept" or "reject". |
required |
proposal_id
|
str | None
|
The proposal, for every action except "list". |
required |
Returns:
| Type | Description |
|---|---|
int
|
0 on success, 1 when the proposal does not exist or is not pending. |