Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/01_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
order_result = client.orders.create(
instrument_name="ETH-PERP",
amount=D("0.10"), # 0.10 ETH
limit_price=D("3000"), # Buy at $3000
limit_price=ticker.index_price * D(0.95), # Buy at 95% of the index price
direction=Direction.buy,
order_type=OrderType.limit,
)
Expand Down
4 changes: 2 additions & 2 deletions examples/04_trading_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
instrument_name=INSTRUMENT,
amount=MINIMUM_AMOUNT,
direction=Direction.buy,
limit_price=ticker.mark_price * D(1.05),
limit_price=ticker.best_ask_price,
order_type=OrderType.market,
)
print("\nMarket order executed:")
Expand All @@ -179,7 +179,7 @@
instrument_name=INSTRUMENT,
amount=MINIMUM_AMOUNT,
direction=Direction.sell,
limit_price=ticker.mark_price * D(0.95),
limit_price=ticker.best_bid_price * D("0.99"), # Acceptable worst price
order_type=OrderType.market,
)
print(f"\nPosition closed: {close_order.order_id}")
Expand Down
2 changes: 1 addition & 1 deletion examples/05_position_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@

# Build transfer list
transfers = []
for pos in positions_to_batch[:3]: # Max 3 for demo
for pos in positions_to_batch[1:2]: # Max 3 for demo
transfers.append(
PositionTransfer(
instrument_name=pos.instrument_name,
Expand Down
Loading