pull down to refresh
Excellent work! Thanks
reply
My pleasure, truly. This is just the preliminary oneliner - I'm fully spent after coding for the past 13h so the final thing will have to come later. For real: getting old sucks.
PS: 💡 Let's see how far we can go in supporting all the research stackers need with sovereign, open-source automation. There's so many bitcoiners with great automation/research skills - and I have seen many of them hanging here.
reply
I am not a coder at all, and I wasn't going to mention this because I don't know how difficult it would be, but I think it would really help liquidity to have some sort of open source trading aid that can be used by anyone who wants to be a market maker on p2p platforms. It would help set prices to generate a target profit, considering fees, market premium, etc. Then people would be incentivized to provide liquidity. It would be almost like open source prop trading software.
reply
We can plot the bid/asks to an extent, and the premiums too.
This is what the orderbook json contains for each order (with a couple optional fields we can deal with):
{
"id": 31829,
"created_at": "2025-02-13T10:08:07.472893Z",
"expires_at": "2025-02-14T01:08:07.472893Z", <--- can check what doesn't expire
"type": 0, <-- 0 = buy, 1 = sell
"currency": 2, <--- see frontend/static/assets/currencies.json
"amount": null,
"has_range": true,
"min_amount": "500.00000000", <--- could use this for liquidity estimates
"max_amount": "1840.00000000", <--- could use this for liquidity estimates too
"payment_method": "Revolut", <-- looks to be freeform-ish, not sure how useful
"is_explicit": false,
"premium": "0.51", <--- looks good for everything I looked at thus far, except XAU
"satoshis": null,
"maker": 1234,
"escrow_duration": 28800, <--- may be interesting to measure over time
"bond_size": "3.00", <--- interesting
"latitude": null, <--- hopefully NO ONE USES THIS
"longitude": null, <--- hopefully NO ONE USES THIS EITHER
"maker_nick": "xxxxx", <--- i'd strip this
"maker_hash_id": "1234567890abcdef...", <--- i'd strip this too
"satoshis_now": 1994359, <--- i need to reverse engineer wtf this is
"price": 92260, <--- this is a bid price (because type=0)
"maker_status": "Inactive" <--- interesting too?
},
reply
Wow! That's terrific. I can't wait to see it in action.
reply
curl -s https://raw.githubusercontent.com/RoboSats/robosats/refs/heads/main/frontend/static/federation.json | jq -r '. | to_entries | .[] | select(.key != "local") | ["curl -s --proxy socks5h://localhost:9050 ", .value.mainnet.onion, "/api/book/ -o ", .key, ".json"] | join("")' | sh && (curl -s -L https://raw.githubusercontent.com/RoboSats/robosats/refs/heads/main/frontend/static/assets/currencies.json && echo $(cat temple.json lake.json veneto.json moon.json | jq --slurp )) | jq --slurp | jq -r '["temple","lake","veneto","moon"] as $fed | ["buy","sell"] as $tp | .[0] as $lkup | .[1] | (to_entries | .[] | .key as $k | reduce .value[] as $b ({}; .[$fed[$k] + "," + $lkup[($b.currency | tostring)] + "," + $tp[$b.type]] += 1) | to_entries) | .[] | [.key, .value] | join(",")'