diff --git a/README.md b/README.md index fcaa5a64fc..30da646c53 100644 --- a/README.md +++ b/README.md @@ -69,15 +69,17 @@ hyperdrive_agent0 = chain.init_agent(base=FixedPoint(100_000), eth=FixedPoint(10 # Run trades. chain.advance_time(datetime.timedelta(weeks=1)) -open_long_event = hyperdrive_agent0.open_long(base=FixedPoint(100), eth=FixedPoint(10)) +open_long_event = hyperdrive_agent0.open_long(base=FixedPoint(100)) chain.advance_time(datetime.timedelta(weeks=5)) close_event = hyperdrive_agent0.close_long( - maturity_time=open_long_event.maturity_time, bonds=open_long_event.bond_amount + maturity_time=open_long_event.args.maturity_time, bonds=open_long_event.args.bond_amount ) # Analyze. pool_info = hyperdrive.get_pool_info(coerce_float=True) pool_info.plot(x="block_number", y="longs_outstanding", kind="line") +trade_ticker = hyperdrive_agent0.get_trade_events() +positions = hyperdrive_agent0.get_positions(show_closed_positions=True) # Shut down the chain. chain.cleanup() @@ -87,7 +89,7 @@ chain.cleanup() ```python import os -from agnet0 import Chain, Hyperdrive +from agent0 import Chain, Hyperdrive # We recommend you use env variables for sensitive information. PUBLIC_ADDRESS = os.getenv("PUBLIC_ADDRESS") @@ -114,7 +116,7 @@ with Chain(RPC_URI) as chain: ```python import os -from agnet0 import Chain, Hyperdrive +from agent0 import Chain, Hyperdrive # We recommend you use env variables for sensitive information. PRIVATE_KEY = os.getenv("PRIVATE_KEY") diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb index d6e40f1658..f138be12d8 100644 --- a/examples/tutorial.ipynb +++ b/examples/tutorial.ipynb @@ -85,8 +85,7 @@ "metadata": {}, "source": [ "The output of these trades represents the corresponding emitted event from Hyperdrive. For example, the open long event\n", - "is shown below. See [here](https://agent0.readthedocs.io/en/latest/autoapi/agent0/core/hyperdrive/interactive/event_types/index.html)\n", - "for documentation on the output event types.\n" + "is shown below.\n" ] }, { diff --git a/pyproject.toml b/pyproject.toml index 96e731222b..5c84ea732f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agent0" -version = "0.26.1" +version = "0.26.2" # Authors are the current, primary stewards of the repo # contributors can be found on github authors = [ @@ -32,8 +32,8 @@ dependencies = [ "eth-account>=0.13.3", "fixedpointmath>=0.2.1", "hexbytes>=1.2.1", - "hyperdrivepy==0.17.1", - "hyperdrivetypes==1.0.20.13", + "hyperdrivepy>=0.17.1", + "hyperdrivetypes>=1.0.20.13", "ipython>=8.26.0", "ipykernel>=6.29.5", "matplotlib>=3.9.2",