kepton0117/sn-79topstrategy main
SPDX license identifierLong base64 string literal
SHA-256853d0fa4af73bb5d846e828cef2d22adfaa4d31b14bcd389e3a49a1aeba31054
MaleculeH(Db₂)Md(Pa)
Evidence
1:5… DX-FileCopyrightText: 2025 Rayleigh Research <to@rayleigh.re>
2# SPDX-License-Identifier: MIT
3"""
4Finance event classes: simulation lifecycle, order placement, trade, cancellation,
5and position-close events for the intelligent markets protocol.
6"""
7from taos.common.protocol import BaseModel
8from pydantic import Field
9from typing import Literal
10from taos.im.protocol.simulator import *
11from taos.common.protocol import SimulationEvent
12from taos.im.utils import duration_from_timestamp
13from taos.im.protocol.models import LoanSettlementOption, OrderCurrency
14
15
16def abbreviate(type_name : str):
17 """
18 Return an abbreviation of an underscore-separate …
65:2… Method to transform agent event messages generated by simulator to the format required by the MarketSimulationStateUpdate synapse.
66 """
67 …
252:38… 'type']), timestamp=json['timestamp'], agentId=json['payload']['agentId'],
253 bookId=json['payload']['payload']['requestPayload']['bookId'],
254 orderId=json['payload']['payl …
786:64… tance(e, OrderCancellationEvent)}
787
788 def append(self, state: 'MarketSimulationStateUpdate') -> 'AgentEventHistory':
789 """
790 Append new events from a MarketSimulationStateUpdate into this history.
791
792 …
836:10… [FinanceEvent.from_json]
837 try:
838 from taos.im.protocol.exchange.events import ExchangeEvent
839
840 out.append(ExchangeEvent.from_json)
841 except Exception:
842 pass
843 return out
⋯4 lines