FYI Notifications
ibc.rest.fyi.FYI
Client for managing FYI notifications via the Interactive Brokers API.
__init__(ib_client, ib_session)
Initializes the FYI client.
Parameters
ib_client : InteractiveBrokersClient
The InteractiveBrokersClient Python Client.
InteractiveBrokersSession
The IB session handler.
unread_number()
Returns the number of unread FYI notifications.
Returns
dict: A resource with the unread notification count.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.unread_number()
settings()
Returns the current FYI notification settings/subscriptions.
Returns
list: A collection of FYI settings resources.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.settings()
toggle_setting(typecode, enabled=True)
Enable or disable a specific FYI notification type.
Parameters
typecode : str
The FYI type code to toggle (e.g. "A", "M").
bool (optional, Default=True)
Whether to enable or disable the notification type.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.toggle_setting(typecode='A', enabled=True)
disclaimer(typecode)
Returns the disclaimer for a specific FYI type.
Parameters
typecode : str The FYI type code.
Returns
dict: A disclaimer resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.disclaimer(typecode='A')
accept_disclaimer(typecode)
Mark a FYI disclaimer as read/accepted.
Parameters
typecode : str The FYI type code.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.accept_disclaimer(typecode='A')
delivery_options()
Returns the delivery options for FYI notifications.
Returns
dict: A delivery options resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.delivery_options()
toggle_email_delivery(enabled=True)
Enable or disable FYI email delivery.
Parameters
enabled : bool (optional, Default=True) Whether to enable email delivery.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.toggle_email_delivery(enabled=True)
toggle_device_delivery(device_id, enabled=True)
Enable or disable FYI notifications for a specific device.
Parameters
device_id : str The device ID.
bool (optional, Default=True)
Whether to enable notifications for this device.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.toggle_device_delivery(
device_id='my-device-123',
enabled=True
)
delete_device(device_id)
Delete a notification device.
Parameters
device_id : str The device ID to delete.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.delete_device(device_id='my-device-123')
notifications(max_count=None, include_read=None)
Returns a list of FYI notifications.
Parameters
max_count : str (optional, Default=None) Maximum number of notifications to return.
bool (optional, Default=None)
Whether to include read notifications.
Returns
list: A collection of notification resources.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.notifications(max_count='10')
more_notifications(notification_id)
Returns more notifications starting from the given ID.
Parameters
notification_id : str The notification ID to start from for pagination.
Returns
list: A collection of notification resources.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.more_notifications(notification_id='123456')
mark_notification_read(notification_id)
Mark a specific notification as read.
Parameters
notification_id : str The notification ID to mark as read.
Returns
dict: A confirmation resource.
Usage
>>> fyi_service = ibc_client.fyi
>>> fyi_service.mark_notification_read(notification_id='123456')