xtp_wrapper

package
v0.0.0-...-ecfb887 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CharsToGoString

func CharsToGoString(any interface{}) string

func GetGoString

func GetGoString(data_ptr *C.char) string

func GetInstrumentsPointer

func GetInstrumentsPointer(input_arr []string) **C.char

func GoCreateLCQuoteApi

func GoCreateLCQuoteApi(client_id int8, folder string) unsafe.Pointer

func GoCreateLCQuoteSpi

func GoCreateLCQuoteSpi() unsafe.Pointer

func GoCreateLCTraderApi

func GoCreateLCTraderApi(client_id int8, folder string) unsafe.Pointer

func GoCreateLCTraderSpi

func GoCreateLCTraderSpi() unsafe.Pointer

func GoReleaseLCQuoteApi

func GoReleaseLCQuoteApi(quote_api unsafe.Pointer)

func GoReleaseLCQuoteSpi

func GoReleaseLCQuoteSpi(quote_api unsafe.Pointer)

func GoReleaseLCTraderApi

func GoReleaseLCTraderApi(trader_api unsafe.Pointer)

func GoReleaseLCTraderSpi

func GoReleaseLCTraderSpi(trader_api unsafe.Pointer)

func Go_quote_apiLogin

func Go_quote_apiLogin(quote_api unsafe.Pointer, ip_addr string, port int, user string, pwd string) int

func Go_quote_apiOnDepthMarketData

func Go_quote_apiOnDepthMarketData(spiPtr C.ulonglong, market_data *C.XTPMD, bid1_qty *C.int64_t,
	bid1_count C.int32_t, max_bid1_count C.int32_t, ask1_qty *C.int64_t, ask1_count C.int32_t, max_ask1_count C.int32_t)

func Go_quote_apiOnError

func Go_quote_apiOnError(spiPtr C.ulonglong, error_info *C.XTPRI)

func Go_quote_apiOnOrderBook

func Go_quote_apiOnOrderBook(spiPtr C.ulonglong, order_book *C.XTPOB)

func Go_quote_apiOnSubMarketData

func Go_quote_apiOnSubMarketData(spiPtr C.ulonglong, ticker *C.XTPST, error_info *C.XTPRI, is_last C.bool)

func Go_quote_apiOnSubOrderBook

func Go_quote_apiOnSubOrderBook(spiPtr C.ulonglong, ticker *C.XTPST, error_info *C.XTPRI, is_last C.bool)

func Go_quote_apiRegisterSpi

func Go_quote_apiRegisterSpi(quote_api unsafe.Pointer, quote_spi unsafe.Pointer)

func Go_quote_apiSubscribeMarketData

func Go_quote_apiSubscribeMarketData(quote_api unsafe.Pointer, stocks map[string]string, e_type int) uint64

func Go_trader_apiLogin

func Go_trader_apiLogin(trader_api unsafe.Pointer, ip_addr string, port int, user string, pwd string, softKey string) uint64

_quote_apiLogin(void * pLC_Api, const char* ip, int port, const char* user, const char* password, XTP_PROTOCOL_TYPE sock_type);

func Go_trader_apiOnDisconnected

func Go_trader_apiOnDisconnected(spiPtr C.ulonglong, session_id C.uint64_t, reason C.int)

func Go_trader_apiOnError

func Go_trader_apiOnError(spiPtr C.ulonglong, error_info *C.XTPRI)

func Go_trader_apiOnOrderEvent

func Go_trader_apiOnOrderEvent(spiPtr C.ulonglong, order_info *C.XTPQueryOrderRsp, error_info *C.XTPRI)

func Go_trader_apiOnQueryAsset

func Go_trader_apiOnQueryAsset(spiPtr C.ulonglong, asset *C.XTPQueryAssetRsp_, error_info *C.XTPRI, request_id C.int, is_last C.bool)

func Go_trader_apiOnQueryOrder

func Go_trader_apiOnQueryOrder(spiPtr C.ulonglong, order_info *C.XTPQueryOrderRsp, error_info *C.XTPRI, request_id C.int, is_last C.bool)

func Go_trader_apiOnQueryPosition

func Go_trader_apiOnQueryPosition(spiPtr C.ulonglong, position *C.XTPQueryStkPositionRsp_, error_info *C.XTPRI, request_id C.int, is_last C.bool)

func Go_trader_apiOnQueryTrade

func Go_trader_apiOnQueryTrade(spiPtr C.ulonglong, trade_info *C.XTPQueryTradeRsp, error_info *C.XTPRI, request_id C.int, is_last C.bool)

func Go_trader_apiOnTradeEvent

func Go_trader_apiOnTradeEvent(spiPtr C.ulonglong, trade_info *C.XTPQueryTradeRsp)

func Go_trader_apiRegisterSpi

func Go_trader_apiRegisterSpi(trader_api unsafe.Pointer, trader_spi unsafe.Pointer)

func SafeShutdown

func SafeShutdown()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL