# Eveswagger Market Data

**URL:** <https://forums.eveonline.com/t/eveswagger-market-data/213729>\
**Category:** Third Party Developers\
**Created:** [January 26, 2020, 12:21am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729 "2020-01-26T00:21:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:21am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/1 "2020-01-26T00:21:24Z")

</div>

I’m trying to build a marketing tool in excel using eveswagger. I have it figured out and functioning; the problem I’m having is that the " /markets/{region\_id}/orders is limited to only returning 1000 rows; is there anyway to change this through power query or another tool? Under Code 200 it says: maxItems: 1000

Any ideas?

Thanks.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [January 26, 2020, 12:33am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/2 "2020-01-26T00:33:56Z")

</div>

It’s 1,000 items _per page_. `ESI` includes an `X-Pages` header within the response that you should use to know how many times to iterate to fetch the other pages. I.e. if that header returns `"5"`, you would want to do 4 more additional requests like:

`/markets/{region_id}/orders?page=2`  
`/markets/{region_id}/orders?page=3`  
`/markets/{region_id}/orders?page=4`  
`/markets/{region_id}/orders?page=5`

---

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:35am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/3 "2020-01-26T00:35:08Z")

</div>

Thank’s, but I’m using the query from website; not the response body; how would I do what you suggest?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [January 26, 2020, 12:36am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/4 "2020-01-26T00:36:51Z")

</div>

Not sure I follow. If you’re not using the request body then how you are getting the data into your sheet? This is kinda related to [ESI Excel login](https://forums.eveonline.com/t/esi-excel-login/209096/5). However I’m not familiar with Power Query so I don’t have any suggestions on how to access response headers.

---

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:38am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/5 "2020-01-26T00:38:51Z")

</div>

I’m pulling data from the “Request URL” and pasting that in the query from web in excel; this will allow a live feed; how would you suggest doing it?

---

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:40am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/6 "2020-01-26T00:40:33Z")

</div>

This is what I’m using

 ![image](https://global.discourse-cdn.com/eveonline/original/3X/b/5/b5be929209455396f56df5d58fa71c63388c24d5.png)

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [January 26, 2020, 12:42am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/7 "2020-01-26T00:42:37Z")

</div>

Right, which would only get you the first page. You’ll need to iterate n times to get all the pages of data. Either by figuring out a way to access the first response’s headers and use the `X-Pages` header, or by hard-coding a value, like that other thread suggests.

It seems in order to get the response headers you would have to create a custom data connector? See [https://community.powerbi.com/t5/Desktop/Retrieve-API-response-headers/m-p/641107/highlight/true#M307053](https://community.powerbi.com/t5/Desktop/Retrieve-API-response-headers/m-p/641107/highlight/true#M307053).

EDIT: If all you really want to do is get price data on a set of items; I would suggest to just use an existing API like [https://market.fuzzwork.co.uk/api/](https://market.fuzzwork.co.uk/api/).

---

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:49am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/8 "2020-01-26T00:49:42Z")

</div>

Thanks for the help; that link is for powerbi, not excel. I’ve used fuzzwork before but it’s hard to create relationships like you can in excel through queries & pivots. The only thing that I can edit in excel is this:

= Table.ExpandRecordColumn(#“Converted to Table”, “Column1”, {“duration”, “is\_buy\_order”, “issued”, “location\_id”, “min\_volume”, “order\_id”, “price”, “range”, “system\_id”, “type\_id”, “volume\_remain”, “volume\_total”}, {“Column1.duration”, “Column1.is\_buy\_order”, “Column1.issued”, “Column1.location\_id”, “Column1.min\_volume”, “Column1.order\_id”, “Column1.price”, “Column1.range”, “Column1.system\_id”, “Column1.type\_id”, “Column1.volume\_remain”, “Column1.volume\_total”})

---

<div class="post-metadata">

**Author:** ![Anderson\_Geten](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/anderson_geten/32/390041_2.png) [@Anderson\_Geten](https://forums.eveonline.com/u/Anderson_Geten)\
**Post date:** [January 26, 2020, 12:50am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/9 "2020-01-26T00:50:54Z")

</div>

you can use the evermarketer API.

It allows you to make only one call to get up to 200 item informations.

Of course the data is limited.

---

<div class="post-metadata">

**Author:** ![Hungry\_Dads](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hungry_dads/32/190129_2.png) [@Hungry\_Dads](https://forums.eveonline.com/u/Hungry_Dads)\
**Post date:** [January 26, 2020, 12:51am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/10 "2020-01-26T00:51:52Z")

</div>

Yeah, I started with that but it is severely limited.

---

<div class="post-metadata">

**Author:** ![Anderson\_Geten](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/anderson_geten/32/390041_2.png) [@Anderson\_Geten](https://forums.eveonline.com/u/Anderson_Geten)\
**Post date:** [January 26, 2020, 12:52am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/11 "2020-01-26T00:52:58Z")

</div>

depends on what you want. will still work out of the box, while your trying to mix ESI and excel may take some time.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [January 26, 2020, 12:56am UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/12 "2020-01-26T00:56:53Z")

</div>

Right, but do they not use the same functions. I.e. it’s also using `Web.contents` which is what you are using in excel no?

---

<div class="post-metadata">

**Author:** ![Olmani\_Kuha](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/olmani_kuha/32/280514_2.png) [@Olmani\_Kuha](https://forums.eveonline.com/u/Olmani_Kuha)\
**Post date:** [January 27, 2020, 12:37pm UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/13 "2020-01-27T12:37:54Z")

</div>

You can loop through pages until no data return

My similar script is down below

```
let
GetJson = (Url) =>
    let 
        RawData = Web.Contents(Url),
        Json = Json.Document(RawData)
    in Json,

region_id= "10000002",
api_url = "https://esi.evetech.net/latest/markets/" & region_id & "/orders/?page=",

Source = List.Generate(()=> [i = 2, temp = GetJson(api_url & Number.ToText(1))] ,
         each List.Count([temp]) > 0,
         each [i = [i] + 1,
               temp = GetJson(api_url & Number.ToText([i]))] ,
         each [temp]),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandListColumn(#"Converted to Table", "Column1"),
#"Expanded Column2" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1", {"duration", "is_buy_order", "issued", "location_id", "min_volume", "order_id", "price", "range", "system_id", "type_id", "volume_remain", "volume_total"}, {"duration", "is_buy_order", "issued", "location_id", "min_volume", "order_id", "price", "range", "system_id", "type_id", "volume_remain", "volume_total"}) in #"Expanded Column2"
```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [April 26, 2020, 12:37pm UTC](https://forums.eveonline.com/t/eveswagger-market-data/213729/14 "2020-04-26T12:37:55Z")

</div>

Closed on April 26, 2020, 12:37pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
