mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-07-28 12:47:43 +00:00
1.7 KiB
1.7 KiB
Result
Table of Contents
class Result()
A base class for handling trade results and strategy parameters for record keeping and analysis.
Attributes
| Name | Type | Description |
|---|---|---|
result |
OrderSendResult |
The result of the trade |
parameters |
dict |
The parameters used for the trade |
name |
str |
The name of the result object |
__init__
def __init__(result: OrderSendResult, parameters: dict = None, name: str = '')
Prepare result data for record keeping and analysis.
Parameters
| Name | Type | Description |
|---|---|---|
result |
OrderSendResult |
The result of the trade |
parameters |
dict |
The parameters used for the trade |
name |
str |
The name of the result object |
get_data
def get_data(self) -> dict:
Get the result data as a dictionary
Returns
| Type | Description |
|---|---|
dict |
The result data |
to_csv
async def to_csv()
Record trade results and associated parameters as a csv file
to_json
async def to_json()
Record trade results and associated parameters as a json file