this api looks neat, since i can get new orders in the last x minutes
but
no order id... which means you can't actually place a buy order with it, right?
You can buy using this endpoint:
api/investor/v1/secondarymarket/accounts/{accountId}/orders
The only required parameters are noteId, price, orderType, and expirationDate.
I'm attaching the full documentation in case you don't have access.
hmm, my json object orders is {[{"noteId":154355428,"price":9.69,"orderType":"BUY","expirationDate":"2019-01-09"}]}
my header is
lc_json_json_headers = {'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization':LC_API_AUTH}
and my call is
response = requests.post('
https://api.lendingclub.com/api/investor/'+LC_VERSION+'/secondarymarket/accounts/'+LC_ACCT_ID+'/orders',
headers=lc_json_json_headers, data=orders)
i feel like this all looks pretty good but am getting a 500 internal server error. am i botching something up?
actually... as i'm writing this post while playing with it, i took out the { } i manually put around my json object input, so now orders is
[{"noteId":154355428,"price":9.69,"orderType":"BUY","expirationDate":"2019-01-09"}]
and it is perfectly happy
the old/other api does not seem to mind them (and i thought i needed them/it was good json to have them) whereas this api does not seem to want them. what is the proper practice for json?
@mikedev10 THANK YOU so much for sharing your code snippet. 6 months after your last post, this was massively helpful for me. I was trying to pass the note info as parameters instead of using the json=data argument. Thanks to you, I was able to figure it out and just made my first successful buy on FolioFN. Much appreciated!
Yes THANK YOU very much!
This was immensely helpful. I can't say the same about Folio's documentation.......