-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce test_api.json to improve tests
- Loading branch information
Showing
6 changed files
with
253 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pyschwab" | ||
version = "0.0.1a4" | ||
version = "0.0.2" | ||
description = "A Python library for the Schwab trading API" | ||
authors = ["Hui Zheng <[email protected]>"] | ||
license = "MIT" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
{ | ||
"tests": { | ||
"place_dict": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Placing order by order dict: {order_dict}", | ||
"order_dict": { | ||
"orderType": "LIMIT", | ||
"session": "NORMAL", | ||
"duration": "DAY", | ||
"orderStrategyType": "SINGLE", | ||
"price": "100.00", | ||
"orderLegCollection": [ | ||
{ | ||
"instruction": "BUY", | ||
"quantity": 1, | ||
"instrument": { | ||
"symbol": "TSLA", | ||
"assetType": "EQUITY" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"place_obj": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Placing order by order object: {order_obj}", | ||
"order_dict": { | ||
"orderType": "LIMIT", | ||
"session": "NORMAL", | ||
"duration": "DAY", | ||
"orderStrategyType": "SINGLE", | ||
"price": "101.00", | ||
"orderLegCollection": [ | ||
{ | ||
"instruction": "BUY", | ||
"quantity": 1, | ||
"instrument": { | ||
"symbol": "TSLA", | ||
"assetType": "EQUITY" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"buy_equity": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Buying equity: {equity}", | ||
"equity": { | ||
"symbol": "TSLA", | ||
"quantity": 1, | ||
"price": 102 | ||
} | ||
}, | ||
|
||
"sell_equity": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Selling equity: {equity}", | ||
"equity": { | ||
"symbol": "TSLA", | ||
"quantity": 1, | ||
"price": 200 | ||
} | ||
}, | ||
|
||
"buy_single_option": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Buying single option: {option}", | ||
"option": { | ||
"symbol": { | ||
"underlying": "RDDT", | ||
"expiration": "260116", | ||
"call_put": true, | ||
"strike": 50.00 | ||
}, | ||
"quantity": 1, | ||
"price": 10 | ||
} | ||
}, | ||
|
||
"sell_single_option": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Selling single option: {option}", | ||
"option": { | ||
"symbol": "RDDT 260116C00050000", | ||
"quantity": 1, | ||
"price": 30 | ||
} | ||
}, | ||
|
||
"buy_call_spread": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Buying call spread: {spread}", | ||
"spread": { | ||
"underlying": "TSLA", | ||
"price": 0.9, | ||
"expiration": "2024-05-31", | ||
"buy_sell": true, | ||
"call_put": true, | ||
"strikes": [177.5, 180], | ||
"quantity": 1 | ||
} | ||
}, | ||
|
||
"replace": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Replacing order with id={order_id} with new price={price} and new quantity={quantity}" | ||
}, | ||
|
||
"cancel": { | ||
"enabled": 0, | ||
"dry_run": 0, | ||
"info": "Canceling order: {order}" | ||
}, | ||
|
||
"preview": { | ||
"enabled": 0, | ||
"dry_run": 0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters