Old Wiki:Market orders

From EVEmu Wiki
Jump to navigation Jump to search

market_orders

Description of the market_orders Table in the EVEmu database.



Field Name Field Type Nullable Key Default Value
'orderID' int(10) unsigned NOT NULL PRIMARY
'typeID' int(10) unsigned NOT NULL 0
'charID' int(10) unsigned NOT NULL 0
'regionID' int(10) unsigned NOT NULL 0
'stationID' int(10) unsigned NOT NULL 0
'range' int(10) unsigned NOT NULL 0
'bid' tinyint(3) unsigned NOT NULL 0
'price' double NOT NULL 0
'volEntered' int(10) unsigned NOT NULL 0
'volRemaining' int(10) unsigned NOT NULL 0
'issued' bigint(20) unsigned NOT NULL 0
'orderState' int(10) unsigned NOT NULL 0
'minVolume' int(10) unsigned NOT NULL 0
'contraband' tinyint(3) unsigned NOT NULL 0
'accountID' int(10) unsigned NOT NULL 0
'duration' int(10) unsigned NOT NULL 0
'isCorp' tinyint(3) unsigned NOT NULL 0
'solarSystemID' int(11) NOT NULL 0
'jumps' tinyint(4) NOT NULL 1

Description of the fields


'orderID'

Unique order ID for this order. Raised incrementally as new orders are made.


'typeID'

The database ID of the item being sold. Refers to the invtypes table.


'charID'

The database ID of the character that placed this order. Refers to the character_ table. A value of '1' gives the money to nobody (an NPC).


'regionID'

The database ID number for the region. Refers to the mapregions table. For example; Lonetrek = '10000016'


'stationID'

The database ID number of the station where the order will be placed. Refers to the stastations table.


'range'

The range this order is good for. For sell orders, this is always 32767. For buy orders, allowed values are:

-1 = station, 0 = solar system, 1 = 1 jump, 2 = 2 jumps, ..., 32767 = region.


Note: Other sources say that for sell orders this is always 32767. Testing has shown that 0 for sell orders also works regionally.


'bid'

If true this is a bid or buy order, else it is a sell order. (leave as 0)


'price'

The order price per unit. An entry of 'baseprice' will use the price in invtypes but multiply it by 10,000.


'volEntered'

The initial quantity being bought/sold.


'volRemaining'

The remaining quantity being bought/sold.


'issued'

The time/date the order was made. Uses ISO 8601 format. "yyyy-MM-ddTHH:mm:sszzz" (example 2013-12-03T10:53:26+00:00)


'orderState'

Member Value Description
OpenActive 0 If the market order is still active and up on the market
Closed 1 The order has been closed
ExpiredFulfilled 2 The order has expired, or has been fulfilled so it is no longer active
Canceled 3 The order was canceled
Pending 4 The order is currently pending, and not on the market
CharacterDeleted 5 The character that this order was associated with has been deleted

'minVolume'

The minimum quantity that will be accepted if it is a buy order.



'contraband'


Note: Further investigation is needed. Default value is '0'.


'accountID'

This is which wallet the order is using, for a personal order this will always be 1000, for corporation orders it can be 1000-1006 depending on which wallet is being used.


'duration'

The length the order is active in days.


'isCorp'

Corporation making the order.

Note: Further investigation is needed. Default value is '0'.


'solarSystemID'

The database ID number for the solar system. Refers to the mapsolarsystems table.


'escrow'

How much ISK is in escrow.


'jumps'

NOT the distance from the player.

Note: Further investigation is needed. Default value is '1'.

Example SQL code;

-- CODE FOR 128 DRONE SKILLBOOKS AT 20000 IN AKIAINAVAS FOR ONE YEAR, SOLD BY NPC

INSERT INTO market_orders (typeID, charID, regionID, stationID, bid, price, volEntered, volRemaining, issued, orderState, minVolume, contraband, accountID, duration, isCorp, solarSystemID, escrow, jumps) VALUES ('24613','1','10000016','60015001','0','20000','128','128','130298106086807141','0','1','0','0','365','0','30011407','0','1');

Note: When entering the field 'range' Mysql creates a 1064 error. So 'range' has been removed from this injection.