Futu (futu v1.1.1)
Futu Elixir API Client
Link to this section Summary
Functions
1004 KeepAlive Cast for the heartbeat, no reply This function will execute in Futu.GenServer automatically
3103 Qot_RequestHistoryKL
1001 InitConnect This function will execute in Futu.GenServer automatically
This is the main function of intereacting Futu TCP client. Three steps here
Refer to historical/1, I don't like the function name
Link to this section Functions
Link to this function
heartbeat()
Specs
heartbeat() :: binary()
1004 KeepAlive Cast for the heartbeat, no reply This function will execute in Futu.GenServer automatically
Link to this function
historical(list)
Specs
3103 Qot_RequestHistoryKL
Paramters
required:
- period, checkout Futu.Quote.Historical.period/1
- market, checkout Futu.Quote.Historical.market/1
- code, e.g. 1
optional:
- rehab, checkout Futu.Quote.Historical.rehab/1
- from, default ~N[1999-01-01 00:00:00]
- to, default now
- max_rows, integer
- next_page_key, if it's included from the last response
- extended_time, boolean, to get the pre-market and after-hours data of US stocks, only supports timeframe of 1-minute
Link to this function
init_connect()
Specs
1001 InitConnect This function will execute in Futu.GenServer automatically
Link to this function
request(module, opts)
Specs
This is the main function of intereacting Futu TCP client. Three steps here:
- build request: opts -> module.encode/1 -> Request.build/3
- send tcp message by GenServer
- parse response:
tcp_reply
-> Response.parse/2
success -> module.decode/1
header failuresuccess request failure
Link to this function
request_history_kl(list)
Specs
Refer to historical/1, I don't like the function name