PHP trading API

Atomical

Newbie
Messages
2
Likes
0
Let's hope this is in the right forum. I'm interested in writing a stock robot. I've coded in C, C++, and PHP. By far I prefer PHP for development time. C is pretty cryptic but 10x faster than C++ with pointer arithmetic. So I'd like to develop an application in PHP. As you can imagine I need a sandbox.

I suppose I could build an API layer around a Java API. But as I understand it that would mean program -> java -> php. Too many abstraction layers.

Suggestions?
 
Let's hope this is in the right forum. I'm interested in writing a stock robot. I've coded in C, C++, and PHP. By far I prefer PHP for development time. C is pretty cryptic but 10x faster than C++ with pointer arithmetic. So I'd like to develop an application in PHP. As you can imagine I need a sandbox.

I suppose I could build an API layer around a Java API. But as I understand it that would mean program -> java -> php. Too many abstraction layers.

Suggestions?

If you want something that is (supposedly) easier than Java or C++ consider Python or Jython which runs on JVM. Integration with Java API should be easier and cleaner and allows a mix on Python and Java in the application.

I use Java almost exclusively these days and I'm glad I do. I put in a number of years as contract developer with C/C++ on Unix systems and for most (but not all) things, I would use Java. Performance is more than enough for most things you are likely to do and if you are planning something for which you need lots of performance you should have the knowledge and experience to choose the right tool anyway.

As for Power Basic, I have no experience so cannot comment , but it does not have the huge user community and vast availability of free libraries and applications that are a huge plus with more mainstream dev environments.
 
Hi....its old this message :-((( nobody idea for php? please nooooooooooo java and blablabla...only php please.........i have a social project in my mind.....can anybody help me?

Regards from Italy
 
Did anyone find a stock trading API that supports PHP?

I've been able to get TD Ameritrade's API to interface with PHP. However, their commissions a pretty high compared to other brokerages like Interactive Brokers.

Has anyone been able to get PHP to work with any brokerage API?

Thanks
 
Ug, I absolutely hate it when someone answers a question by saying "I see you're asking about PHP, but let me tell you something completely irrelevant, like a different programming language"

To answer your question, no broker that I've found has a PHP API, but don't fret...plenty of brokers can utilize PHP just fine. TD Ameritrade as mentioned above does, as well as Just2Trade and Lightspeed. All of these use sockets (and streaming) or urls to do all of their interaction, which php does just fine, and can be written with just a few lines of code. Google "php sockets" and learn how to use sockets. After that, connecting to the above systems is fairly easy, and they provide ample socket "message" examples (just no PHP information)

Don't even attempt PHP with interactive brokers, haha
 
Top