Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Trade XML feed
  FAQ FAQ  Forum Search   Register Register  Login Login

Trade XML feed

 Post Reply Post Reply
Author
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Topic: Trade XML feed
    Posted: 06 May 2021 at 17:30
TRADE XML

Hey everyone,

Here's an example of a trade XML feed, based on real data.  I bought the first 1 wood order in the nearest hub to me Big smile and turned the underlying data into a parse-able format.

<trade_orders>
  <server>
    <name>elgea</name>
    <country_code>gb</country_code>
    <language_code>en</language_code>
    <live_date>2010-02-21T21:53:01.190</live_date>
    <data_generation_datetime>2021-05-06T16:19:25.207</data_generation_datetime>
  </server>
  <trade_order id="2900625">
    <transaction_datetime>2021-05-06T14:43:01.060</transaction_datetime>
    <location_type id="2">Hub</location_type>
    <order_type id="6">Collecting goods from trade hub offer</order_type>
    <trade_offer id="756706" />
    <offer_by>
      <player id="400767">
        <name>Lochlainn</name>
      </player>
      <town id="0" />
      <collectedfromhub id="198">
        <name>Memor</name>
      </collectedfromhub>
      <alliance id="2123">
        <name>Elves</name>
        <ticker>ELVES</ticker>
      </alliance>
    </offer_by>
    <accepted_by>
      <player id="1">
        <name>GM Stormcrow</name>
      </player>
      <town id="1">
        <name>Stormont</name>
      </town>
      <alliance id="18">
        <name>Band of Devs</name>
        <ticker>DEVS</ticker>
      </alliance>
    </accepted_by>
    <item id="17">
      <name>Wood</name>
      <quantity>1</quantity>
      <price_per_item>0.850000</price_per_item>
    </item>
  </trade_order>
</trade_orders>

The whole thing should be fairly self-explanatory, however:

trade_order_id is the unique reference for this purchase or sale of a specific quantity from a buy or sell order
trade_offer_id is the unique reference for the buy or sell order itself

location_type_id is the general location of the order being accepted, and will be either
1 = Town 
2 = Hub

order_type_id 
Values that could be returned are:
2 = Town Sell Order
5 = Town Buy Order
6 = Collecting goods from a trade hub sell order
7 = Delivering goods to a trade hub buy order

Comments welcome, additional information you want etc, please do let me know.

Thanks in advance,

SC




Edited by GM Stormcrow - 06 May 2021 at 18:17
Back to Top
Jejune View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 10 Feb 2013
Status: Offline
Points: 1035
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jejune Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2021 at 18:57
This is fantastic, GM Stormcrow. Thank you! The individual XML files that accompany combat reports have proven to be incredibly useful and reliable for a number of inititives, and if we can have similar files for other actions that take place and are communicated via IGM, it will enhance gameplay.

One question: will all trade-related IGMs include an XML file? For example, when caravans are intercepted by a blockade, harvesters destroyed, etc.?

Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2021 at 14:22
Originally posted by Jejune Jejune wrote:

One question: will all trade-related IGMs include an XML file? For example, when caravans are intercepted by a blockade, harvesters destroyed, etc.?
Hi Jejune,

Yes; though I'll be doing the action xmls one at a time.  Once people have had a look at this proposed format (above) and it's generally agreed to work for what people want, then I'll roll it out to live, check it's working, and start adding variants to other trade-related messages.

Cheers,

SC


Edited by GM Stormcrow - 07 May 2021 at 14:22
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2021 at 18:58
If no other comments on the trade XML proposal, I'll implement it as suggested.  

Speak now, or forever hold your etc!

Best, 

SC


Edited by GM Stormcrow - 12 May 2021 at 18:58
Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1829
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2021 at 20:59
Sorry SC, been tied up (not literally) with some DurcTools stuff. The proposal looks like it has absolutely everything anyone could need.

Tens
Back to Top
DarkenedHeart View Drop Down
New Poster
New Poster
Avatar

Joined: 05 Mar 2021
Location: Montana
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote DarkenedHeart Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2021 at 14:44
Looks good.  Been a busy work for me.

Question I have is will this be expanded to track when buy / sell orders have been placed or removed at hubs/towns?  Or is this purely for transaction based tracking?
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2021 at 11:49
Originally posted by DarkenedHeart DarkenedHeart wrote:

Question I have is will this be expanded to track when buy / sell orders have been placed or removed at hubs/towns?  Or is this purely for transaction based tracking?
This is currently transaction-based tracking on an individual trade level.

If there is demand, I'm happy to expand it out to a proper higher-level feed linking to all individual-player trades at an API key level.  So far, the general consensus seems to be that the higher level 'listing' API isn't really a priority.

I totally get what you're asking about a global buy/sell orders feed, however there's a few issues with that conceptually, regarding asymmetry of information etc.  

ie, if there's a feed of all current order books in all hubs, then the idea of hub visibility range/radius is impaired, as everyone can theoretically have access to perfect pricing information across Illyria at all times.   My worry there is that traders who take advantage of price disparities between hubs could potentially find themselves out of a career if perfect knowledge is available to all.  There's still a price/quantity/distance/opportunity cost argument to be had, of course, even with perfect information.

Though, as always, am receptive to thoughts/discussion on this.

Best,

SC



Edited by GM Stormcrow - 20 May 2021 at 11:52
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jun 2021 at 11:31
This should now be live.  I'd be very grateful if players could test out that it's returning what's expected on pressing the XML button, and let me know of any issues soonest.

Best wishes,

SC
Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1829
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jun 2021 at 13:40
At first glance it looks OK SC but I'll do a more complete check in a bit.
Tens
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3926
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jun 2021 at 13:48
Originally posted by Tensmoor Tensmoor wrote:

At first glance it looks OK SC but I'll do a more complete check in a bit.
Tens
Fab, thanks Tens.

SC
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.