manifoldmarkets / market-maker

A market-making bot for Manifold's prediction markets
MIT License
31 stars 18 forks source link

Is this still up to date? #3

Open niel96 opened 8 months ago

niel96 commented 8 months ago

Dear,

i tried out this software, i'm not a programmer but trader. I got some issues at multiple occasions trying to run this software. I'm wondering if this is still up to date or doesn't work anymore? It would have been a great tool otherwise...

FetchError: invalid json response body at https://manifold.markets/api/v0/markets?limit=1000&before=KxesWYLx2QAKmkQhQh1b reason: Unexpected token 'u', "upstream c"... is not valid JSON at C:\Users\niel\market-maker\node_modules\node-fetch\lib\index.js:272:32 at processTicksAndRejections (node:internal/process/task_queues:95:5) at async getMarkets (C:\Users\niel\market-maker\src\api.ts:17:33) at async getAllMarkets (C:\Users\niel\market-maker\src\api.ts:31:35) at async betOnTopMarkets (C:\Users\niel\market-maker\src\market-maker.ts:43:19) at async main (C:\Users\niel\market-maker\src\market-maker.ts:38:5) { type: 'invalid-json' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

TypeError: Cannot read properties of undefined (reading 'filter') at C:\Users\niel\market-maker\src\market-maker.ts:59:42 at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 3) at async batchedWaitAll (C:\Users\niel\market-maker\src\api.ts:118:19) at async betOnTopMarkets (C:\Users\niel\market-maker\src\market-maker.ts:56:3) at async main (C:\Users\niel\market-maker\src\market-maker.ts:38:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

niel96 commented 8 months ago

ScreenHunter 1791

Ok seems like the api is not up to date anymore, hope it works now.

jahooma commented 8 months ago

Oh sorry, yes I haven't looked at this code in a long time

niel96 commented 8 months ago

No problem haha. I just made some changes that i found in the pull requests. Let's see if it works now. I have not much programming experience, first time doing this but it works with the help of chatgpt. lol

niel96 commented 8 months ago

I seem to still get an error:

error Command failed with exit code 1. at https://api.manifold.markets/v0/market/I9MKafdaZoi5mSMsCDmO reason: Unexpected token '<', "<!doctype "... is not valid JSON info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. at processTicksAndRejections (node:internal/process/task_queues:95:5) C:\Users\niel\market-maker>(C:\Users\niel\market-maker\src\api.ts:10:30) at async C:\Users\niel\market-maker\src\market-maker.ts:59:26 at async Promise.all (index 7) at async batchedWaitAll (C:\Users\niel\market-maker\src\api.ts:125:19) at async betOnTopMarkets (C:\Users\niel\market-maker\src\market-maker.ts:57:3) at async main (C:\Users\niel\market-maker\src\market-maker.ts:39:5) { type: 'invalid-json' }

So seems there are now these markets that have the type: "doc". It's like just a question you can answer on. I will have to make the script skip these.

niel96 commented 8 months ago

ok i give up, tried lot of things.