|
本帖最後由 zaqimon 於 17-4-19 11:07 編輯
VB6我沒用過
我有用AutoIt測試過可以下單
- Global $g_ConApi, $g_ConFOrderNew
- Global $ret, $val1, $val2
- $g_ConApi = ObjCreate("Concord.API.Future.Client.ucClient")
- ObjEvent($g_ConApi, "_ConcordEvent_")
- $g_ConFOrderNew = ObjCreate("Concord.API.Future.Client.OrderFormat.FOrderNew")
- $ret = $g_ConApi.Login("id", "pass", "203.66.1.101", $val1) ; ret=000
- $g_ConFOrderNew.BHNO = "000" ; branch number
- $g_ConFOrderNew.CSEQ = "8888888" ; account number
- $g_ConFOrderNew.mtype = "F" ; F - futures | O - options
- $g_ConFOrderNew.sflag = "1" ; 1 - 期貨單式
- $g_ConFOrderNew.commo = "TXFD7" ; 商品代碼
- $g_ConFOrderNew.fir = "R" ; F - FOK | I - IOC | R - ROD
- $g_ConFOrderNew.rtype = "" ; 沖銷別 空白 - 自動
- $g_ConFOrderNew.otype = "L" ; M - MKT | L - LMT | P - 一定範圍市價
- $g_ConFOrderNew.bs = "S" ; B - Buy | S - Sell
- $g_ConFOrderNew.qty = "1"
- $g_ConFOrderNew.price = "9999"
- $ret = $g_ConApi.FOrderNew($g_ConFOrderNew, $val1, $val2) ; $ret = 121
複製代碼
p.s.
康和API 20170407有更新版本
我看好像只有下單相關部分有多了一個參數
其餘沒有變動 |
|