For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Generic REST or streaming feed/broker



  • Has there been any work done on a datafeed and/or broker that uses a standard format or API where one could provide a URL and boom, everything works?
    Something like...
    Historical data:
    <url>/historical/<instrument>/<granularity>/<compression>/<from>/<to>
    Last bar:
    <url>/live/<instrument>/<granularity>/<compression>
    Send an order:
    <url>/order/<instrument><side>/<price>/<size>
    Get executions to date for order:
    <url>/executions/<orderid>
    Get current position for instrument:
    <url>/position/<instrument>

    Then all someone would have to do it implement providing data and/or execution API and that would work out-of-the-box or so to speak with their custom external feed/execution server. The same could be done with streaming sockets as long as a transmission format came with the feed/broker classes.

    Anyone know of anything I could use or start off from?


  • administrators

    @Benoit-Dufresne said in Generic REST or streaming feed/broker:

    Generic REST

    That doesn't exist

    @Benoit-Dufresne said in Generic REST or streaming feed/broker:

    Historical data:
    <url>/historical/<instrument>/<granularity>/<compression>/<from>/<to>
    Last bar:
    <url>/live/<instrument>/<granularity>/<compression>
    Send an order:
    <url>/order/<instrument><side>/<price>/<size>
    Get executions to date for order:
    <url>/executions/<orderid>
    Get current position for instrument:
    <url>/position/<instrument>

    That's a "specific" implementation you have made up (or seen somewhere). It's not generic. There is no such thing.

    @Benoit-Dufresne said in Generic REST or streaming feed/broker:

    and that would work out-of-the-box

    That doesn't exist either.

    Your best bet is to have a look of the Oanda store sources, which uses REST and work your way up to the specific implementation you are looking for.



  • What I meant to ask is if anyone worked on a REST store/broker/feed with a clear specification of the API you'd need to implement to make it work.

    I guess the complete answer is (for the next random person looking for a way in):

    Yes, Oanda has exactly that right here.
    The oandapy package is basically just what you're looking for and is just a bunch of requests and links to documentation.
    All that's missing is a constructor where you provide your own URLs and voilà

    I've seen my question asked under several forms here and there and the answer is always "look at Oanda". I think most people asking this (most definitely) are just missing out on the fact that the oandapy source code is super simple. They've looked at oandastore.py and haven't understood what they needed to do to adapt it to their needs.

    Another possible answer I've found is

    Look up Dave Vallance's repo and implement your own exchange in ccxt


Log in to reply
 

});