feat: add convert order type

- Add `convert` orders for direct base/quote token exchange without order book
- Distinguish buy/sell validation: buy uses quoteOrderQty, sell uses quantity
- Support automatic amount estimation when only one of quantity/quoteOrderQty is provided
- Update README: replace old order type list, document convert usage with BASE/QUOTE symbols and new examples
- Lowercase order_type and side values throughout documentation
This commit is contained in:
2026-08-19 14:18:25 +08:00
parent 52fcccd178
commit 77d5f053f0
3 files changed
+240 -20

No files matched your search

+3 -1
View File
@@ -5,6 +5,7 @@
import csv
import os
import re
from collections import defaultdict
@@ -33,7 +34,8 @@ def process_csv(input_file, output_file):
for row in reader:
datetime_str = row["日期"]
date_part, time_part = datetime_str.split("T")
order_id = row["备注"].split("Order ID: ")[-1].strip()
match = re.search(r"Order ID[^:]*:\s*([^\s,]+)", row["备注"])
order_id = match.group(1) if match else row["备注"]
merge_key = (date_part, row["证券代码"])
record = merged_records[merge_key]