Author Topic: API call on Openledger?  (Read 3427 times)

0 Members and 1 Guest are viewing this topic.

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: speedy
API call on Openledger?
« on: November 12, 2015, 12:09:02 am »
Is there a URL at bitshares.openledger.info that I can use to call APIs on Openledger's witness node?

Ive been looking at how the webwallet source does it, but I cant figure out how to extract a url. Does it require websockets first?

I specifically want to call the get_market_history api.

Offline speedy

  • Hero Member
  • *****
  • Posts: 1160
    • View Profile
  • BitShares: speedy
Re: API call on Openledger?
« Reply #1 on: November 12, 2015, 12:42:58 am »
Hmm I figured it out - url is https://bitshares.openledger.info/ws/ and api params are in the POST.

Offline jza

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: API call on Openledger?
« Reply #2 on: August 06, 2016, 07:24:54 am »
I just get this:
Code: [Select]
11 eof_exception: End Of File
stringstream
    {}
    th_a  sstream.cpp:109 peek

    {"str":""}
    th_a  json.cpp:478 from_string

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12636
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: API call on Openledger?
« Reply #3 on: August 08, 2016, 08:43:45 am »
Code: [Select]
curl --data '{"jsonrpc":"2.0","method":"call", "params":[0, "get_global_properties", [""]],"id":0}' https://bitshares.openledger.info/ws
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline jza

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: API call on Openledger?
« Reply #4 on: August 09, 2016, 05:35:20 am »
Great any documentation on the methods, can I get a trading pair, get last/bid/ask prices? or query the order book?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12636
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: API call on Openledger?
« Reply #5 on: August 09, 2016, 12:26:28 pm »
Great any documentation on the methods, can I get a trading pair, get last/bid/ask prices? or query the order book?
docs.bitshares.eu/api/
or via python-graphene:
http://python-graphenelib.readthedocs.io/en/develop/exchange.html
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH