# Global

##

### Methods

#### defineAlgoOrder(definition) → {object}

Source:
  - define_algo_order.js, line 14

Attaches default handlers if not supplied & returns the algo order definition

##### Parameters:

Name | Type | Description
--- | --- | ---
`definition` | object | algorithmic order definition

##### Returns:

ao

Type
  object

### Type Definitions

#### AOInstance

Source:
  - ao_host.js, line 389

##### Properties:

Name | Type | Description
--- | --- | ---
`state` | object | instance state used during execution ###### Properties
Name | Type | Description
--- | --- | ---
`id` | number | ID of the instance
`gid` | number | ID of the order group, attached to all orders
`channels` | Array | subscribed channels and their filters
`orders` | object | map of open orders key'd by client ID
`cancelledOrders` | object | map of cancelled orders key'd by client ID
`allOrders` | object | map of all orders ever created by the instance key'd by client ID
`ev` | AsyncEventEmitter | internal event emitter
`h` | module:Helpers | helpers bound to the instance

##### Type:

- object

#### AOUIDefinition

Source:
  - ao_host.js, line 31

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`label` | string |  | name of the order to be shown to the user
`id` | string |  | internal algorithmic order ID
`uiIcon` | string | <optional> | CSS classname of the icon to show
`customHelp` | string | <optional> | documentation
`connectionTimeout` | number |  | how long to wait before considering the HF disconnected
`actionTimeout` | number |  | how long to wait for action confirmatio before considering the HF disconnected
`header` | object | <optional> | rendered at the top of the form ###### Properties
Name | Type | Attributes | Description
--- | --- | --- | ---
`component` | string | <optional> | component to use for the header
`fields` | Array.<string> | <optional> | array of field names to render in header
`sections` | Array.<object> |  | the layout definition itself
`sections[].title` | string |  | rendered above the section
`sections[].name` | string |  | unique internal ID for the section
`sections[].rows` | Array.<Array.<string>> |  | array of rows of field IDs to render in the section, two per row.
`fields` | object |  | field definitions, key'd by ID
`actions` | Array.<string> |  | array of action names, maximum 2

##### Type:

- object

#### EventMetaInformation

Source:
  - ao_host.js, line 25

##### Properties:

Name | Type | Description
--- | --- | ---
`chanFilter` | object | source channel filter ###### Properties
Name | Type | Description
--- | --- | ---
`symbol` | string | source channel symbol

##### Type:

- object