5

attempting to write 3 broker integrations for my fintech product today: TD Ameritrade, Tradier, and TradeStation...

starting with just the most basic possible: live bid / ask price, then will go from there...

will report back

will likely fail

🤡

Comments
  • 1
    Good luck and may the nose be with you!
  • 2
    How are you approaching the real-time exactly-once bidirectional pub/sub problem?
    Asking for a friend.
    Who had to build something like it for shipping capacity auctions.

    Like, the bid and asking prices for each symbol must be collected then published instantly to thousands of subscribers, and you can't show the same quote twice or all hell breaks loose. Then someone somewhere makes a new bid and the problem begins anew, but in reverse.

    The folks at Twitter gave up on near-instant because it requires an overpowered n-to-n Kafka pub/sub, they simply made so that your tweets require several seconds to reach the first few thousand subscribers, and hours to reach the world.
    The moneybags at Bloomberg built their own fucking dedicated multi-tier network infrastructure that costs more than the GDP of Ireland.

    Very curious in how you are approaching this problem.
  • 0
    @JsonBoa ? It's just a websocket, after OAuth it all runs in the client directly, so the browser is doing all the 'work'

    Brokers typically minimize the payload by sending only what changes, however client side this is a bit tricky because you basically have to update only what isn't undefined. Probably there is a way to do this super efficiently but with react / redux there is for sure small performance loss
  • 1
    ✅ TD Ameritrade complete

    Moving on to Tradier...
  • 0
    ✅ Tradier complete

    Can't do TradeStation because it requires further confirmation from their side for API access

    done for the day
  • 0
    @fullstackcircus dude, websockets might be quite the bottleneck your users start trading during a feeding frenzy - i.e. the entire GME debacle. Because it might get inconsistencies.
    But I guess the retail brokers will have a auto-cancel feature when things start getting race-condition-ny.

    99.999% of the time, though? you probably fine.
  • 0
    @JsonBoa I'm sure the NYSE can handle my meager 20-100 users
  • 0
    @fullstackcircus the exchanges can, but can your customer support? the problem here is a jerk in nowhereville complaining that he clicked "buy" and the trade didn't want through because by the time it got to the exchange the price has moved.
    Quite the headache for B2B, and a migraine in B2C.
Add Comment