This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PERPORDERBOOKSIDE to AccountInfo converters.
- Loading branch information
Geoff Taylor
committed
Dec 22, 2021
1 parent
eac3e89
commit 277e253
Showing
3 changed files
with
22 additions
and
3 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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
# [Email](mailto:[email protected]) | ||
|
||
import argparse | ||
import collections | ||
import enum | ||
import json | ||
import jsons | ||
|
@@ -52,7 +53,11 @@ def output(obj: typing.Any) -> None: | |
print(json.dumps(jsons.dump(obj, strip_attr=("data", "logger", "lot_size_converter", "tokens", "tokens_by_index", "slots", "base_tokens", "base_tokens_by_index", "oracles", "oracles_by_index", "spot_markets", "spot_markets_by_index", "perp_markets", "perp_markets_by_index", "shared_quote_token", "liquidity_incentive_token"), | ||
key_transformer=jsons.KEY_TRANSFORMER_CAMELCASE), sort_keys=True, indent=4)) | ||
else: | ||
print(obj) | ||
if isinstance(obj, collections.Sequence) and not isinstance(obj, str): | ||
for item in obj: | ||
print(item) | ||
else: | ||
print(obj) | ||
|
||
|
||
# # 🥭 parse_args | ||
|