IbkrApi.Support.HTTPStubs.OrderStub (ibkr_api v1.0.3)

View Source

Stub module for IbkrApi.ClientPortal.Order HTTP requests.

Summary

Functions

Stubs the delete_order endpoint.

Stubs the get_order_status endpoint.

Stubs the list_orders endpoint.

Stubs the modify_order endpoint.

Stubs the place_order endpoint.

Stubs the place_order_for_fa_group endpoint.

Stubs the place_order_reply endpoint.

Stubs the what_if endpoint.

Functions

stub_delete_order(response_fn \\ nil)

Stubs the delete_order endpoint.

stub_get_order_status(response_fn \\ nil)

Stubs the get_order_status endpoint.

stub_list_orders(response_fn \\ nil)

Stubs the list_orders endpoint.

Examples

OrderStub.stub_list_orders()
# Or with custom response:
OrderStub.stub_list_orders(HTTPMock.success([%{"order_id" => "12345", "symbol" => "MSFT", ...}]))

stub_modify_order(response_fn \\ nil)

Stubs the modify_order endpoint.

stub_place_order(response_fn \\ nil)

Stubs the place_order endpoint.

stub_place_order_for_fa_group(response_fn \\ nil)

Stubs the place_order_for_fa_group endpoint.

stub_place_order_reply(response_fn \\ nil)

Stubs the place_order_reply endpoint.

stub_what_if(response_fn \\ nil)

Stubs the what_if endpoint.