fix_test.go 554 B

1234567891011121314151617181920212223242526
  1. package fix_test
  2. import "tickserver/api/fix"
  3. import "testing"
  4. import "fmt"
  5. func TestMarketData(t *testing.T) {
  6. path := "./SessionCfgMk.cfg"
  7. fmt.Println(path)
  8. ss , err := fix.NewSessionSettings(path)
  9. if err != nil {
  10. panic(err)
  11. }
  12. app := &fix.AppBase{}
  13. trade, err := fix.NewAppTradeClient(app, ss)
  14. if err != nil {
  15. panic(err)
  16. }
  17. trade.Start()
  18. fmt.Println("run start")
  19. trade.Run()
  20. fmt.Println("run end")
  21. trade.Stop()
  22. trade.Free()
  23. fmt.Println("stop")
  24. }