These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Getting started with the EVE API

Author
Maxwell Gauss
Juro Political Extraction
#1 - 2016-04-04 03:51:36 UTC
Hello I'm fairly new to EvE as a whole and have note used the API yet (although I've programmed before). Could someone answer these basic questions for me?

In particular, I am only interested in collecting market data, not player information.

1) What is the name of the OFFICIAL api for gathering market data (is it eve-marketdata.com? or is this a 3rd party site?).

2) What is Crest?

3) Where can I find documentation on the API

4) (optional) post an example of a string i could enter into my browser to see the jita price of a single item?

Thanks!
Philip Ogtaulmolfi
We are not bad. Just unlucky
#2 - 2016-04-04 07:03:29 UTC
Hi, Maxwell:

You can start here
Maxwell Gauss
Juro Political Extraction
#3 - 2016-04-05 23:21:51 UTC
Thank you!
Diego DelTorros
Dire Wolf Armoury
#4 - 2016-04-06 05:57:48 UTC  |  Edited by: Diego DelTorros
Hey Maxwell,

1) in the recent post about new changes there might be indeed some data available for markets (https://forums.eveonline.com/default.aspx?g=posts&m=6419504#post6419504) However I receive the error "Market Not Open". As far as I know there is no way to retrieve real time market data from CREST right now.

2) If you are familiar with REST, then you already know what CREST is :) If not - basically you make get requests to retrieve some data. This is the entry point - https://public-crest.eveonline.com you can navigate to all other endpoints from there. For example if you want to retrieve data about facilities, you hit the URL - https://public-crest.eveonline.com/industry/facilities/

Here is some ruby code that you can embed into your rails application

module Stations
    require 'open-uri'
    require 'nokogiri'
    require 'json'

    def self.findStations(solarSystems)
        # This method checks for given Solar Systems all Staitions within those systems
        # it is required, because the quicklook api from eve-central doesn't return
        # solar systems (only regions and stations). Thus we need to perform one single
        # query on required goods and then select only the - here returned - stations

        facilities = Array.new
        url = "https://public-crest.eveonline.com/industry/facilities/"
        
        doc = Nokogiri::HTML(open(url))
        data = JSON.parse(doc)
        
        data['items'].each_with_index do |item, index|
            # p index
            if solarSystems.include?(item["solarSystem"]["id"] )
                facilities << item["facilityID"]
            end
        end

        return facilities
    end

end


3) It is somewhat highly discussed topic. There are pieces of information here and there... Just see the reddit post about this issue - https://www.reddit.com/r/evetech/comments/4bwmqg/where_the_heck_is_crest_documentation/

4) I'm not aware of such via CREST. For my application I'm using eve-central.com API. It is quite well documentated and can help you out to start with (https://eve-central.com/home/develop.html)
A possible string would be http://api.eve-central.com/api/quicklook?typeid=34&usesystem=30000142
It will look up Tritanium (id 34) in Jita (system_id 30000142)
If you are using Chrome, get the JSONview extension, so the data (the answers from eve central API or CREST) will be displayed in some human readable format.

http://eve-trader.net - small web application for industrialist. Calculate your profits on blueprints in real time.

Maxwell Gauss
Juro Political Extraction
#5 - 2016-04-15 15:43:42 UTC
That's very helpful! Thank you for the detailed resposen
Skadoos
Doomheim
#6 - 2016-04-16 17:41:11 UTC  |  Edited by: Skadoos
Maxwell Gauss wrote:
4) (optional) post an example of a string i could enter into my browser to see the jita price of a single item?


Assuming you want the value of the lowest sell order of Zydrine in Jita, here's how you'd get it from CREST. First you'll need to find the region ID of The Forge since market orders are organized by region. Looking at https://public-crest.eveonline.com/ you'll notice that there's a /regions endpoint and pulling up https://public-crest.eveonline.com/regions/ gives you the ID:

"id_str": "10000002",
"href": "https://public-crest.eveonline.com/regions/10000002/",
"id": 10000002,
"name": "The Forge"

Then you'll need to find the type ID of Zydrine by pulling up https://public-crest.eveonline.com/types/:

"id_str": "39",
"href": "https://public-crest.eveonline.com/types/39/",
"id": 39,
"name": "Zydrine"

Then you'll need to feed the above href to the market sell orders endpoint of The Forge at https://public-crest.eveonline.com/market/10000002/orders/sell/?type=https://public-crest.eveonline.com/types/39/ which gives you a list of all Zydrine sell orders in The Forge. All that's left is to filter out all orders in Jita IV - Moon 4 - Caldari Navy Assembly Plant and sort them by price to get the lowest price.
Delta Sagittarii
EVE Clones Corporation
#7 - 2016-06-16 15:25:48 UTC