OK, so to do something like this we want to think about what it is we’re trying to do. We want to change the way the ALP bot trades, right? So we go to github, find the lastest branch on nupool, and go to trading.py:
https://github.com/Cybnate/nu-pool/blob/master/python/trading.py
First, go down to pybot rather than nubot. Next, we look for the subroutine. Placeorder looks good, but it just calls the preceding subroutine ‘place’, so let’s look there. Scanning the code, we quickly find a ‘response[balance]’ variable. By finding where that response is defined, we see that we can specify a side. If I weren’t worried about not counting nbt already in an order, I’d almost be done.
Anyway, I’ll keep looking at it, I just wanted to let everyone know my general approach.
Discuss.nubits Won’t let me post unless I change it cause its dumb…