Hacker News new | past | comments | ask | show | jobs | submit login

Bot behavior under improbable scenarios is a function of its author's paranoia. I'm sure you're right about the vast majority of bots, but I'll be much more amused than surprised if it happens



  if $PRICE < 20% of $LAST_PRICE:
    # flash crash, don't be picky, time to make money!!
    submit_market_order()

Edit: Fixed formatting


Indent everything you want code-formatted. Lose the backticks, they're just noise


TIL. Thanks!


Yeah I can see nothing wrong with this except for stock splits, dividends, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: