| 02-18 22:35:33 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 Tiger data: avgFillPrice=77.929, filledQuantity=10, totalQuantity=10, realizedPnl=0, commission=2.98, reason=, order_type=LMT, outside_rth=True |
| 02-18 22:35:33 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 available attributes: ['account', 'action', 'active', 'adjust_limit', 'algo_params', 'algo_strategy', 'attr_desc', 'attr_list', 'aux_price', 'avg_fill_price', 'can_modify', 'charges', 'combo_type', 'combo_type_desc', 'commission', 'contract', 'contract_legs', 'discount', 'expire_time', 'external_id', 'filled', 'filled_cash_amount', 'filled_scale', 'gst', 'id', 'is_open', 'is_partially_filled', 'latest_price', 'limit_price', 'liquidation', 'order_id', 'order_legs', 'order_time', 'order_type', 'orders', 'outside_rth', 'parent_id', 'percent_offset', 'quantity', 'quantity_scale', 'realized_pnl', 'reason', 'refund_cash_amount', 'remaining', 'secret_key', 'source', 'status', 'sub_ids', 'time_in_force', 'to_dict', 'total_cash_amount', 'trade_time', 'trading_session_type', 'trail_stop_price', 'trailing_percent', 'update_time', 'user_mark'] |
| 02-18 22:35:32 |
INFO
|
order |
|
tiger_client |
Retrieved 0 filled orders |
| 02-18 22:35:32 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:35:31 |
INFO
|
order |
|
tiger_client |
Retrieved 2 filled orders |
| 02-18 22:35:31 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:35:31 |
WARN
|
trailing_stop |
|
trailing_stop_scheduler |
⚠️ Qty mismatch for NFLX (real): DB trailing_stop=1.0, Tiger=4 |
| 02-18 22:35:31 |
INFO
|
sync |
|
trailing_stop_engine |
📊 Syncing avg cost for NFLX: 77.93 -> 78.23 |
| 02-18 22:35:31 |
INFO
|
position |
|
trailing_stop_engine |
📊 Syncing quantity for NFLX: 1.0 -> 4 |
| 02-18 22:35:31 |
INFO
|
sync |
|
trailing_stop_engine |
📊 Syncing avg cost for NFLX: 77.94 -> 77.95 |
| 02-18 22:35:31 |
INFO
|
trailing_stop |
|
trailing_stop_scheduler |
🔄 Full sync: Processing 2 active trailing stop positions (API verification) |
| 02-18 22:35:31 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 10, Cost: 78.227 |
| 02-18 22:35:31 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: all |
| 02-18 22:35:30 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 4, Cost: 77.9465 |
| 02-18 22:35:30 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: all |
| 02-18 22:35:28 |
ERROR
|
order |
|
order_tracker_service |
❌ Error in handle_fill_event for 42277739866882048: Failed to create Position for NFLX paper 2026-02-18 after 5 attempts |
| 02-18 22:35:28 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 749393), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 782532), 'updated_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 782539)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:35:28 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 749393), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 776792), 'updated_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 776799)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:35:28 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 749393), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 770766), 'updated_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 770773)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:35:28 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 749393), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 764563), 'updated_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 764569)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:35:28 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 749393), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 758249), 'updated_at': datetime.datetime(2026, 2, 18, 22, 35, 28, 758256)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:35:28 |
INFO
|
order |
|
order_tracker_service |
📋 Order 42277739866882048 FILLED (source=polling): NFLX entry qty=10 price=$77.93 pnl=$0.00 |
| 02-18 22:35:28 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 Tiger data: avgFillPrice=77.929, filledQuantity=10, totalQuantity=10, realizedPnl=0, commission=2.98, reason=, order_type=LMT, outside_rth=True |
| 02-18 22:35:28 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 available attributes: ['account', 'action', 'active', 'adjust_limit', 'algo_params', 'algo_strategy', 'attr_desc', 'attr_list', 'aux_price', 'avg_fill_price', 'can_modify', 'charges', 'combo_type', 'combo_type_desc', 'commission', 'contract', 'contract_legs', 'discount', 'expire_time', 'external_id', 'filled', 'filled_cash_amount', 'filled_scale', 'gst', 'id', 'is_open', 'is_partially_filled', 'latest_price', 'limit_price', 'liquidation', 'order_id', 'order_legs', 'order_time', 'order_type', 'orders', 'outside_rth', 'parent_id', 'percent_offset', 'quantity', 'quantity_scale', 'realized_pnl', 'reason', 'refund_cash_amount', 'remaining', 'secret_key', 'source', 'status', 'sub_ids', 'time_in_force', 'to_dict', 'total_cash_amount', 'trade_time', 'trading_session_type', 'trail_stop_price', 'trailing_percent', 'update_time', 'user_mark'] |
| 02-18 22:35:27 |
INFO
|
order |
|
tiger_client |
Retrieved 0 filled orders |
| 02-18 22:35:27 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:35:27 |
INFO
|
sync |
|
trailing_stop_scheduler |
📊 Reconciliation (real): entries=1, exits=0, updated=0, linked=0, ts_deactivated=0 |
| 02-18 22:35:27 |
INFO
|
order |
|
trailing_stop_scheduler |
📊 Created EntrySignalRecord for NFLX order 42277911787734016 |
| 02-18 22:35:27 |
INFO
|
order |
|
tiger_client |
Retrieved 2 filled orders |
| 02-18 22:35:27 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:35:27 |
WARN
|
trailing_stop |
|
trailing_stop_scheduler |
⚠️ Qty mismatch for NFLX (real): DB trailing_stop=1.0, Tiger=4 |
| 02-18 22:35:26 |
INFO
|
sync |
|
trailing_stop_engine |
📊 Syncing avg cost for NFLX: 77.93 -> 78.23 |
| 02-18 22:35:26 |
INFO
|
position |
|
trailing_stop_engine |
📊 Syncing quantity for NFLX: 1.0 -> 4 |
| 02-18 22:35:26 |
INFO
|
sync |
|
trailing_stop_engine |
📊 Syncing avg cost for NFLX: 77.94 -> 77.95 |
| 02-18 22:35:26 |
INFO
|
trailing_stop |
|
trailing_stop_scheduler |
🔄 Full sync: Processing 2 active trailing stop positions (API verification) |
| 02-18 22:35:26 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 10, Cost: 78.227 |
| 02-18 22:35:26 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: all |
| 02-18 22:35:26 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 4, Cost: 77.9465 |
| 02-18 22:35:26 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: all |
| 02-18 22:34:30 |
INFO
|
order |
|
routes |
Discord notification sent with real Tiger data: filled, price: 77.9486 |
| 02-18 22:34:30 |
INFO
|
order |
|
routes |
📊 Entry fill processed via OrderTracker: filled |
| 02-18 22:34:30 |
WARN
|
signal |
|
discord_notifier |
Discord TTS webhook URL未配置,语音通知将被禁用 |
| 02-18 22:34:30 |
WARN
|
signal |
|
discord_notifier |
Discord webhook URL未配置,格式化通知将被禁用 |
| 02-18 22:34:30 |
INFO
|
order |
|
order_tracker_service |
📦 Entry fill → Position updated: NFLX 3@$77.95 |
| 02-18 22:34:30 |
INFO
|
order |
|
order_tracker_service |
📋 Order 42277911787734016 FILLED (source=polling_entry): NFLX entry qty=3 price=$77.95 pnl=$0.00 |
| 02-18 22:34:30 |
ERROR
|
error |
|
routes |
Failed to apply auto-protection: rate limited: Rate limited: code=1200 msg=standard account response error(bad_request:当前时段不支持下单) |
| 02-18 22:34:30 |
ERROR
|
order |
|
oca_service |
Failed to create OCA protection: Rate limited: code=1200 msg=standard account response error(bad_request:当前时段不支持下单) |
| 02-18 22:34:30 |
WARN
|
order |
|
tiger_client |
OCA creation rate-limited for NFLX, skipping fallback orders to avoid further throttling |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
OCA TP leg: price=$85.0, outside_rth=True |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
OCA stop leg: trigger=$75.0, limit=$74.62, outside_rth=True |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Real account: TIF=GTC, both orders outside_rth=True |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Cancelled existing orders for NFLX |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
No open orders found for NFLX |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Retrieved 0 open orders for NFLX |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Creating OCA orders for LONG position: 4 shares of NFLX |
| 02-18 22:34:30 |
INFO
|
position |
|
tiger_client |
Skipping position check for NFLX, using provided side=long, qty=4 |
| 02-18 22:34:30 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 4, Cost: 77.9465 |
| 02-18 22:34:30 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: NFLX |
| 02-18 22:34:30 |
INFO
|
order |
|
routes |
Applying OCA protection for NFLX via create_oca_protection (dedup-safe) |
| 02-18 22:34:30 |
INFO
|
order |
|
routes |
Order 42277911787734016 filled, applying auto-protection for position increase |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Order 42277911787734016 Tiger data: avgFillPrice=77.9486, filledQuantity=3, totalQuantity=3, realizedPnl=0, commission=0, reason=, order_type=LMT, outside_rth=True |
| 02-18 22:34:30 |
INFO
|
order |
|
tiger_client |
Order 42277911787734016 available attributes: ['account', 'action', 'active', 'adjust_limit', 'algo_params', 'algo_strategy', 'attr_desc', 'attr_list', 'aux_price', 'avg_fill_price', 'can_modify', 'charges', 'combo_type', 'combo_type_desc', 'commission', 'contract', 'contract_legs', 'discount', 'expire_time', 'external_id', 'filled', 'filled_cash_amount', 'filled_scale', 'gst', 'id', 'is_open', 'is_partially_filled', 'latest_price', 'limit_price', 'liquidation', 'order_id', 'order_legs', 'order_time', 'order_type', 'orders', 'outside_rth', 'parent_id', 'percent_offset', 'quantity', 'quantity_scale', 'realized_pnl', 'reason', 'refund_cash_amount', 'remaining', 'secret_key', 'source', 'status', 'sub_ids', 'time_in_force', 'to_dict', 'total_cash_amount', 'trade_time', 'trading_session_type', 'trail_stop_price', 'trailing_percent', 'update_time', 'user_mark'] |
| 02-18 22:34:29 |
ERROR
|
order |
|
order_tracker_service |
❌ Error in handle_fill_event for 42277739866882048: Failed to create Position for NFLX paper 2026-02-18 after 5 attempts |
| 02-18 22:34:29 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 424721), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 456572), 'updated_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 456580)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:34:29 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 424721), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 449712), 'updated_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 449718)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:34:29 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 424721), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 443668), 'updated_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 443674)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:34:29 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 424721), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 437991), 'updated_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 437998)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:34:29 |
WARN
|
trailing_stop |
|
position_service |
🔁 Position key collision for NFLX_2026-02-18_1 (paper), retrying with next sequence: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ix_position_position_key"
DETAIL: Key (position_key)=(NFLX_2026-02-18_1) already exists.
[SQL: INSERT INTO position (position_key, symbol, account_type, trade_date, sequence_number, side, status, total_entry_quantity, total_exit_quantity, avg_entry_price, avg_exit_price, realized_pnl, commission, trailing_stop_id, opened_at, closed_at, created_at, updated_at) VALUES (%(position_key)s, %(symbol)s, %(account_type)s, %(trade_date)s, %(sequence_number)s, %(side)s, %(status)s, %(total_entry_quantity)s, %(total_exit_quantity)s, %(avg_entry_price)s, %(avg_exit_price)s, %(realized_pnl)s, %(commission)s, %(trailing_stop_id)s, %(opened_at)s, %(closed_at)s, %(created_at)s, %(updated_at)s) RETURNING position.id]
[parameters: {'position_key': 'NFLX_2026-02-18_1', 'symbol': 'NFLX', 'account_type': 'paper', 'trade_date': datetime.date(2026, 2, 18), 'sequence_number': 1, 'side': 'long', 'status': 'OPEN', 'total_entry_quantity': 0, 'total_exit_quantity': 0, 'avg_entry_price': None, 'avg_exit_price': None, 'realized_pnl': None, 'commission': None, 'trailing_stop_id': None, 'opened_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 424721), 'closed_at': None, 'created_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 432446), 'updated_at': datetime.datetime(2026, 2, 18, 22, 34, 29, 432455)}]
(Background on this error at: https://sqlalche.me/e/20/gkpj) |
| 02-18 22:34:29 |
INFO
|
order |
|
order_tracker_service |
📋 Order 42277739866882048 FILLED (source=polling): NFLX entry qty=10 price=$77.93 pnl=$0.00 |
| 02-18 22:34:29 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 Tiger data: avgFillPrice=77.929, filledQuantity=10, totalQuantity=10, realizedPnl=0, commission=2.98, reason=, order_type=LMT, outside_rth=True |
| 02-18 22:34:29 |
INFO
|
order |
|
tiger_client |
Order 42277739866882048 available attributes: ['account', 'action', 'active', 'adjust_limit', 'algo_params', 'algo_strategy', 'attr_desc', 'attr_list', 'aux_price', 'avg_fill_price', 'can_modify', 'charges', 'combo_type', 'combo_type_desc', 'commission', 'contract', 'contract_legs', 'discount', 'expire_time', 'external_id', 'filled', 'filled_cash_amount', 'filled_scale', 'gst', 'id', 'is_open', 'is_partially_filled', 'latest_price', 'limit_price', 'liquidation', 'order_id', 'order_legs', 'order_time', 'order_type', 'orders', 'outside_rth', 'parent_id', 'percent_offset', 'quantity', 'quantity_scale', 'realized_pnl', 'reason', 'refund_cash_amount', 'remaining', 'secret_key', 'source', 'status', 'sub_ids', 'time_in_force', 'to_dict', 'total_cash_amount', 'trade_time', 'trading_session_type', 'trail_stop_price', 'trailing_percent', 'update_time', 'user_mark'] |
| 02-18 22:34:29 |
INFO
|
order |
|
routes |
Order placed successfully: 42277911787734016 |
| 02-18 22:34:29 |
INFO
|
order |
|
routes |
Order requires auto-protection after execution: NFLX |
| 02-18 22:34:29 |
INFO
|
order |
|
order_tracker_service |
📋 Registered order 42277911787734016: NFLX entry (real) |
| 02-18 22:34:29 |
INFO
|
order |
|
tiger_client |
Position increase order placed successfully. Protection info saved for later application. |
| 02-18 22:34:29 |
INFO
|
order |
|
tiger_client |
Order placed successfully: 42277911787734016 |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Retrieved 0 filled orders |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Position increase detected: will place main order without attachments, then set protection for entire position |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
No open orders found for NFLX, proceeding with position increase |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Position increase detected for NFLX. Checking for existing orders to cancel... |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
✅ Detected LONG position increase: current 1 shares, adding 3.0 shares |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
🧮 Position increase logic check: current_qty=1, action=BUY |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
📋 Current position for NFLX: quantity=1, cost=77.94, value=77.94 |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
📈 Position query returned 1 positions for NFLX |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
📊 Position query result for NFLX: success=True |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 1, Cost: 77.94 |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: NFLX |
| 02-18 22:34:28 |
INFO
|
position |
|
tiger_client |
🔍 Position Increase Check: BUY 3.0 NFLX |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Retrieved 1 filled orders |
| 02-18 22:34:28 |
INFO
|
order |
|
tiger_client |
Getting filled orders from 2026-02-17 to 2026-02-18 |
| 02-18 22:34:28 |
INFO
|
order |
|
signal_parser |
Signal parsed successfully: {'symbol': 'NFLX', 'is_close_signal': False, 'side': 'buy', 'quantity': 3.0, 'order_type': 'limit', 'stop_loss': 75.0, 'take_profit': 85.0, 'reference_price': 78.0, 'trading_session': 'extended', 'outside_rth': True, 'price': 78.0, 'time_in_force': 'day'} |
| 02-18 22:34:28 |
INFO
|
order |
|
signal_parser |
Converted market order to limit order at $78.00 for extended hours trading |
| 02-18 22:34:28 |
INFO
|
general |
|
signal_parser |
📊 SL/TP parsed: SL=$75.0, TP=$85.0 |
| 02-18 22:34:28 |
INFO
|
trailing_stop |
|
routes |
Received webhook from 54.86.50.139: {
"action": "buy",
"extras": {
"indicator": "Momo Strong Entry",
"timeframe": "15"
},
"quantity": 3,
"referencePrice": 78,
"stopLoss": {
"stopPrice": 75
},
"takeProfit": {
"limitPrice": 85
},
"ticker": "NFLX"
} |
| 02-18 22:34:27 |
INFO
|
sync |
|
trailing_stop_engine |
📊 Syncing avg cost for NFLX: 77.93 -> 78.23 |
| 02-18 22:34:27 |
INFO
|
trailing_stop |
|
trailing_stop_scheduler |
🔄 Full sync: Processing 2 active trailing stop positions (API verification) |
| 02-18 22:34:27 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 10, Cost: 78.227 |
| 02-18 22:34:27 |
INFO
|
position |
|
tiger_client |
Getting positions for symbol: all |
| 02-18 22:34:26 |
INFO
|
position |
|
tiger_client |
Position: NFLX, Qty: 1, Cost: 77.94 |