Python StockTwits Posting messages

530 Views Asked by At

Has no one figured this out yet??? The API docs are very confusing and poorly written. StockTwits doesn't respond. Twitter is so much easier with their API.

I have tried to make requests to get the access token. I did get one, one time. haven't been able to since. not sure what magic I did to get it. After I have the access token I tried to use

payload={"access_token":{ACCESS_TOKEN}, "body":"TEST TEST TEST"} requests.post("http://api.stocktwits.com/api/2/messages/create.json", data=payload)

of course, this returns a 404 response. any help would be greatly greatly apprecaited.

i'm using python 3x and trying to just post messages to stocktwits.

1

There are 1 best solutions below

0
Shaun On

Needs to be json, not data

requests.post("http://api.stocktwits.com/api/2/messages/create.json", json=payload)