Twongo API V1 - Markets

 

Markets

Returns a list of all launched markets or details about a specific market.

GET /markets

Show a list of all launched markets.

URL

http://api.twongo.com/v1/markets{.xml,.json}

Formats

XML (default)
JSON

Sample XML Request

GET /v1/markets.xml HTTP/1.1

Sample XML Response

<?xml version="1.0" encoding="UTF-8"?>
<markets>
  <market id="raleigh-durham">
    <id>raleigh-durham</id>
    <latitude type="float">35.8189</latitude>
    <longitude type="float">-78.6447</longitude>
    <name>Raleigh-Durham</name>
    <timezone>Eastern Time (US &amp; Canada)</timezone>
    <timezone-offset-in-seconds type="integer">-18000</timezone-offset-in-seconds>
  </market>
</markets>

Sample JSON Request

GET /v1/markets.json HTTP/1.1

Sample JSON Response

{"markets":[{"timezone_offset_in_seconds":-18000,"name":"Raleigh-Durham","latitude":35.8189,"id":"raleigh-durham","timezone":"Eastern Time (US & Canada)","longitude":-78.6447}]}

GET /markets/<id>

Show the details of a specified market.

URL

http://api.twongo.com/v1/markets/<id>{.xml,.json}

Formats

XML (default)
JSON

Sample XML Request

GET /v1/markets/raleigh-durham.xml HTTP/1.1

Sample XML Response

<?xml version="1.0" encoding="UTF-8"?>
<market id="raleigh-durham">
  <id>raleigh-durham</id>
  <latitude type="float">35.8189</latitude>
  <longitude type="float">-78.6447</longitude>
  <name>Raleigh-Durham</name>
  <timezone>Eastern Time (US &amp; Canada)</timezone>
  <timezone-offset-in-seconds type="integer">-18000</timezone-offset-in-seconds>
</market>

Sample JSON Request

GET /v1/markets/raleigh-durham.json HTTP/1.1

Sample JSON Response

{"market":{"timezone_offset_in_seconds":-18000,"name":"Raleigh-Durham","latitude":35.8189,"id":"raleigh-durham","timezone":"Eastern Time (US & Canada)","longitude":-78.6447}}