Exchange
The exchange is where players trade bulk goods with each other: stone, soil, tree trunks, ore and crops. You say how many you want to sell or buy and the price for each one. The exchange pairs sellers with buyers on its own, and the two of you never need to be online together.
All numbers are placeholders.
Exchange or market? #
| Market | Exchange | |
|---|---|---|
| What you can sell | Any stack you are holding | Only the goods in /exchange list |
| How much | One stack per listing | 1 to 10,000 per order |
| The price is for | The whole stack | Each item |
| Who makes the trade | A buyer picks your listing | The exchange pairs orders by price |
| Can buyers ask first | No | Yes, with a buy order |
| Selling part of it | No, all or nothing | Yes, an order trades a bit at a time |
| The cut taken from the seller | 2% | 1% |
| How long it stays up | 3 days | 7 days |
Use the market for single stacks and unusual items. Use the exchange for goods you gather in bulk.
What is traded #
/exchange list shows every item the exchange trades. For each one that has orders it shows the cheapest price anyone is selling at and the highest price anyone is buying at, in coins per item. Items nobody has an order for are named together on the last line.
To start with the exchange trades:
- Stone:
Rock_Stone,Rock_Stone_Cobble,Rock_Sandstone,Rock_Basalt,Rock_Shale,Rock_Slate,Rock_Marble - Soil:
Soil_Dirt,Soil_Grass,Soil_Sand,Soil_Clay,Soil_Gravel - Tree trunks:
Wood_Oak_Trunk,Wood_Birch_Trunk,Wood_Fir_Trunk,Wood_Maple_Trunk,Wood_Beech_Trunk,Wood_Ash_Trunk - Ore:
Ore_Copper,Ore_Iron,Ore_Silver,Ore_Gold,Ore_Cobalt,Ore_Thorium,Ore_Mithril,Ore_Adamantite - Crops:
Plant_Crop_Wheat_Item,Plant_Crop_Carrot_Item,Plant_Crop_Potato_Item,Plant_Crop_Corn_Item,Plant_Crop_Tomato_Item,Plant_Crop_Pumpkin_Item,Plant_Crop_Lettuce_Item,Plant_Crop_Onion_Item,Plant_Crop_Turnip_Item
In every command, part of an item's name is enough: wheat means Plant_Crop_Wheat_Item. If what you typed fits several items, the exchange lists them and you type more of the name. The full name always works, so rock_stone means Rock_Stone and not Rock_Stone_Cobble.
Looking at prices #
/exchange book <item> shows the 5 best prices on each side for one item, and how many items are waiting at each price. Example: /exchange book rock_stone might show
Rock_Stone on the exchange, as amount at coins each:
Selling, cheapest first: 180 at 5, 40 at 7
Buying, highest first: 50 at 4, 300 at 2
Selling #
/exchange sell <item> <amount> <price> offers items for sale. The price is the least you will take for each one. Example: /exchange sell rock_stone 200 5 offers 200 stone at 5 coins each.
- The items leave your inventory straight away. They are taken from your hotbar, storage and backpack, and you must be carrying the full amount.
- If buyers are already waiting at your price or more, you sell to them at once, starting with the buyer who pays most. You are paid the buyer's price, so you can get more than you asked for and never less.
- Whatever is not sold at once waits as a sell offer with a number, such as
#12. - The exchange keeps 1% of what each trade pays you. It is rounded down for each trade, so a trade worth less than 100 coins pays no fee at all.
- Only items that are the same as a fresh one of their kind can be sold.
Buying #
/exchange buy <item> <amount> <price> asks to buy items. The price is the most you will pay for each one. Example: /exchange buy wheat 50 4 asks for 50 wheat at up to 4 coins each.
- You pay the full amount up front from your purse: price x amount, so 200 coins in the example. The exchange sets the coins aside for the order.
- If sellers are already offering at your price or less, you buy from them at once, starting with the cheapest. You pay the seller's price, and the difference comes straight back to your purse.
- Whatever is not bought at once waits as a buy order with a number, and its coins stay set aside.
- Buyers pay no fee.
- The items you bought go into your inventory. Any that do not fit wait for you:
/exchange claim.
How orders are paired #
- The best price goes first: a seller meets the highest buy order, a buyer meets the cheapest sell offer.
- At the same price, the order that was placed first goes first.
- A trade always happens at the price of the order that was already waiting.
- You cannot trade with yourself. If you have an order that your new one would meet, take the old one down first.
Your orders #
/exchange ordersshows your open orders with their numbers and the hours each has left, and what the exchange is holding for you./exchange cancel <number>takes one of your orders down. Example:/exchange cancel 12. The items that had not sold, or the coins that had not been spent, come back to you./exchange claimcollects everything the exchange is holding for you: coins from sales, items you bought while you were away, and whatever came back from orders that ran out. Items that do not fit stay with the exchange until you make room and claim again.- You can have up to 10 open orders at once, sell offers and buy orders together. You need a free slot to place an order, even one that trades at once.
- An order stays up for 7 days. After that it comes down by itself, and its unsold items or unspent coins wait for you:
/exchange claim. - If you are online when one of your orders trades, you are told.
- Whenever you sell, buy or cancel, the exchange also hands you anything else it was holding for you.
The numbers #
| Price for each item | 1 to 1,000,000 coins, whole coins only |
| Amount in one order | 1 to 10,000 |
| Open orders for each player | 10 |
| How long an order stays up | 7 days |
| Fee | 1% of each trade, rounded down, taken from the seller |
| Smallest trade that pays a fee | 100 coins (fee: 1 coin) |
Prices shown by /exchange book | The best 5 on each side |
Example #
Ada holds 300 Rock_Stone and types /exchange sell rock_stone 300 5. Nobody is buying yet, so all 300 wait as offer #1.
Ben types /exchange list and sees Rock_Stone: on sale from 5, nobody buying. He types /exchange buy rock_stone 120 6, which takes 720 coins from his purse. The stone was on offer at 5, so the 120 stone cost him 600 coins: the other 120 coins come straight back, and the stone goes into his inventory. Ada is told that offer #1 sold 120. She types /exchange claim and gets 594 coins: 600 less the 1% fee of 6. Her offer still has 180 stone on it.
Cal types /exchange buy rock_stone 50 4. Nobody sells that cheaply, so 200 coins are set aside and the order waits as #3. Later Dot types /exchange sell rock_stone 80 3. Cal is paying 4, so 50 of Dot's stone sell to Cal at 4 coins each: 200 coins, less a fee of 2. Dot's other 30 stone wait on offer at 3 coins each, now the cheapest stone on the exchange.
When you join, you are told if the exchange is holding coins or items for you.
For server owners #
exchange.jsoninmods/Driftholm_Driftholm/lists the item ids that can be traded:{ "Items": ["Rock_Stone", "Ore_Copper", "Plant_Crop_Wheat_Item"] }List only plain goods that stack. The exchange keeps an item id and a count, so it cannot hold a used tool or an item with data of its own. An id that is not an item in the game, or an item that does not stack, is reported in the server log at startup. Restart the server to apply a change.
- Taking an item off the list stops new orders for it. Orders already in the book stay: their owners can still see, cancel and claim them, and they run out after 7 days as usual.
- The exchange is saved to
mods/Driftholm_Driftholm/exchange.txtafter every change. It holds the open orders, the coins set aside for buy orders, and the coins and items waiting for players, so back it up with the rest of the server. Do not edit it while the server is running. - If a line cannot be read at start, the server logs it, leaves it out, and keeps a copy of the whole file as
exchange.txt.unreadable-<time>. If the file cannot be read at all, the exchange stays closed, players are told it is closed for repairs, and the file is left untouched. Fix or restore the file and restart.