GithubHelp home page GithubHelp logo

nitecon / iqfeed Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 16.0 32 KB

Golang implementation for IQ Feed low level network protocol reader.

License: BSD 3-Clause "New" or "Revised" License

Go 100.00%

iqfeed's Introduction

iqfeed

Golang implementation for IQ Feed low level network protocol reader.

iqfeed's People

Contributors

federicoleon avatar jweissig avatar nitecon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iqfeed's Issues

Problem with iqfeed pkg.

Hello, I want to know if your package is working?
Because I get an error that I can not connect to the port.
Can I get quotes through it?
Thank you for answer!

Error - Slice bounds out of range

Running your iqfeed_example yields the following under Win 10:

C:\Users\lewpa\go\src\github.com\Nitecon\iqfeed_example>go run main.go
System: &iqfeed.SystemMessage{Customer:iqfeed.CustomerData{ServiceType:"", IP:"", Port:0, Token:"", Version:"", Deprecated1:0, VerboseExchanges:"", Deprecated2:"", MaxSymbols:0, Flags:"", Deprecated3:"", Deprecated4:""}, Stats:iqfeed.SystemStats{ServerIP:"", ServerPort:0, MaxSymbols:0, NumberOfSymbols:0, ClientsConnected:0, SecondsSinceLastUpdate:0, Reconnections:0, AttemptedReconnections:0, StartTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, MarketTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Status:"", IQFeedVersion:"", LoginID:"", TotalKBsRecv:0, KBsPerSecRecv:0, AvgKBsPerSecRecv:0, TotalKBsSent:0, KBsPerSecSent:0, AvgKBsPerSecSent:0}}
System: &iqfeed.SystemMessage{Customer:iqfeed.CustomerData{ServiceType:"", IP:"", Port:0, Token:"", Version:"", Deprecated1:0, VerboseExchanges:"", Deprecated2:"", MaxSymbols:0, Flags:"", Deprecated3:"", Deprecated4:""}, Stats:iqfeed.SystemStats{ServerIP:"", ServerPort:0, MaxSymbols:0, NumberOfSymbols:0, ClientsConnected:0, SecondsSinceLastUpdate:0, Reconnections:0, AttemptedReconnections:0, StartTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, MarketTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Status:"", IQFeedVersion:"", LoginID:"", TotalKBsRecv:0, KBsPerSecRecv:0, AvgKBsPerSecRecv:0, TotalKBsSent:0, KBsPerSecSent:0, AvgKBsPerSecSent:0}}
System: &iqfeed.SystemMessage{Customer:iqfeed.CustomerData{ServiceType:"", IP:"", Port:0, Token:"", Version:"", Deprecated1:0, VerboseExchanges:"", Deprecated2:"", MaxSymbols:0, Flags:"", Deprecated3:"", Deprecated4:""}, Stats:iqfeed.SystemStats{ServerIP:"", ServerPort:0, MaxSymbols:0, NumberOfSymbols:0, ClientsConnected:0, SecondsSinceLastUpdate:0, Reconnections:0, AttemptedReconnections:0, StartTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, MarketTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Status:"", IQFeedVersion:"", LoginID:"", TotalKBsRecv:0, KBsPerSecRecv:0, AvgKBsPerSecRecv:0, TotalKBsSent:0, KBsPerSecSent:0, AvgKBsPerSecSent:0}}
System: &iqfeed.SystemMessage{Customer:iqfeed.CustomerData{ServiceType:"", IP:"", Port:0, Token:"", Version:"", Deprecated1:0, VerboseExchanges:"", Deprecated2:"", MaxSymbols:0, Flags:"", Deprecated3:"", Deprecated4:""}, Stats:iqfeed.SystemStats{ServerIP:"", ServerPort:0, MaxSymbols:0, NumberOfSymbols:0, ClientsConnected:0, SecondsSinceLastUpdate:0, Reconnections:0, AttemptedReconnections:0, StartTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, MarketTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Status:"", IQFeedVersion:"", LoginID:"", TotalKBsRecv:0, KBsPerSecRecv:0, AvgKBsPerSecRecv:0, TotalKBsSent:0, KBsPerSecSent:0, AvgKBsPerSecSent:0}}
System: &iqfeed.SystemMessage{Customer:iqfeed.CustomerData{ServiceType:"", IP:"", Port:0, Token:"", Version:"", Deprecated1:0, VerboseExchanges:"", Deprecated2:"", MaxSymbols:0, Flags:"", Deprecated3:"", Deprecated4:""}, Stats:iqfeed.SystemStats{ServerIP:"", ServerPort:0, MaxSymbols:0, NumberOfSymbols:0, ClientsConnected:0, SecondsSinceLastUpdate:0, Reconnections:0, AttemptedReconnections:0, StartTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, MarketTime:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, Status:"", IQFeedVersion:"", LoginID:"", TotalKBsRecv:0, KBsPerSecRecv:0, AvgKBsPerSecRecv:0, TotalKBsSent:0, KBsPerSecSent:0, AvgKBsPerSecSent:0}}
panic: runtime error: slice bounds out of range

goroutine 20 [running]:
github.com/Nitecon/iqfeed.(*IQC).processReceiver(0xc00008c000, 0xc0000b2978, 0x0, 0x688)
        C:/Users/lewpa/go/src/github.com/Nitecon/iqfeed/iqfeed.go:141 +0x32f
github.com/Nitecon/iqfeed.(*IQC).read(0xc00008c000)
        C:/Users/lewpa/go/src/github.com/Nitecon/iqfeed/iqfeed.go:181 +0x1a6
created by github.com/Nitecon/iqfeed.(*IQC).Start
        C:/Users/lewpa/go/src/github.com/Nitecon/iqfeed/iqfeed.go:268 +0x1d0
exit status 2

Can't get it to login

I am getting connected successfully but I cant get it to Connect(). I beleive I am calling the proper commands in the right order. All I get back is S,KEY,99999

func TestStart(t *testing.T) {
	var iqc IQC
	go func() {
		for {
			select {
			case msg1 := <-iqc.System:
				fmt.Println("received", msg1)
			case msg2 := <-iqc.Errors:
				fmt.Println("received", msg2)
			case msg2 := <-iqc.Regional:
				fmt.Println("received", msg2)
			case msg2 := <-iqc.Updates:
				fmt.Println("received", msg2)
			case msg2 := <-iqc.Time:
				fmt.Println("received", msg2)
			}
		}
	}()
	iqc.Start("localhost:5009")
	fmt.Println("Started IqFeed on Quote Port")
	iqc.SetProtocol("6.2")
	iqc.SetClientName("golang-iqfeed")
	iqc.Connect()
	time.Sleep(30 * time.Second)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.