decred.org/dcrdex@v1.0.5/spec/admin.mediawiki (about) 1 =Exchange Administration= 2 3 __TOC__ 4 5 Operation of the DEX will require a non-trivial amount of administrative labor. 6 Clients will expect near-perfect uptime and long-term operation. 7 8 Operators must manage exchange settings properly to keep markets liquid and to 9 balance fees and settlement speed. 10 That said, changes to exchange or asset variables will often entail revocation 11 of all existing orders on a market, so should be done as infrequently as 12 possible. 13 14 ==Exchange Variables== 15 16 {| 17 ! variable !! relevant section !! units || default 18 |- 19 | epoch duration || [[fundamentals.mediawiki/#epoch-based-order-matching|Epoch-based Order Matching]] || milliseconds || 20,000 20 |- 21 | market buy buffer || [[orders.mediawiki/#market-buy-orders|Market Buy Orders]] || unitless ratio || 1.25 22 |- 23 | bonds || [[fundamentals.mediawiki/#bonds|Bonds]] || atoms || 2e8 (2 DCR) 24 |- 25 | cancellation threshold || [[community.mediawiki/#rule-3-an-accounts-cancellation-rate-must-not-exceed-the-threshold|Rule 3]] || unitless ratio || 0.6 26 |- 27 | broadcast timeout || [[fundamentals.mediawiki/#exchange-variables|Exchange Variables]] & [[community.mediawiki/#rule-1-clients-must-respond-to-all-preimage-requests|Rule 1]] || milliseconds || 60,000 28 |} 29 30 ==Per-asset Variables== 31 32 {| 33 ! variable !! units !! description 34 |- 35 | lot size || atoms || the minimum order quantity and the order quantity increment when an asset is the base asset 36 |- 37 | rate step || atoms || the minimum price rate and the price rate increment when an asset is the quote asset. [[orders.mediawiki/#rate-encoding|message-rate encoding]] 38 |- 39 | fee rate || atoms/byte || the minimum fee rate for swap transactions 40 |- 41 | swap confirmations|| count || the Minimum confirmations before acting on a swap transaction 42 |} 43 44 See also [[fundamentals.mediawiki/#exchange-variables|Exchange Variables]]. 45 46 ==Administration API== 47 48 The server will provide an HTTP API for performing various adminstrative tasks. 49 50 '''API Endpoints''' 51 {| 52 ! path !! method !! description 53 |- 54 | /ping || GET || checks if admin server is alive. Returns `pong` if server is still alive 55 |- 56 | /config || GET || the current DEX configuration. See [[fundamentals.mediawiki/#configuration-data-request|Configuration Data Request]] 57 |- 58 | /enabledataapi/{yes} || GET || enable or disable the HTTP data API. "yes" must be a valid BOOL value (e.g, true, false) 59 |- 60 | /asset/{assetSymbol} || GET || display information about specified asset symbol (e.g dcr, btc) 61 |- 62 | /asset/{assetSymbol}/setfeescale/{scale} || GET || sets the fee rate scale factor for the specified asset. The scale factor must be a valid float(e.g 2.0). The default is 1.0. 63 |- 64 | /accounts || GET || lists information about all known accounts 65 |- 66 | /account/{accountID} || GET || list information about a specific account 67 |- 68 | /account/{accountID}/notify?timeout=TIMEOUT || POST || send a notification containing text in the request body to account. If not currently connected, the notification will be sent upon reconnect unless timeout duration has passed. default timeout is 72 hours. timeout should be of the form #h#m#s (i.e. "2h" or "5h30m"). Header Content-Type must be set to "text/plain" 69 |- 70 | /account/{accountID}/forgive_match/{matchID} || GET || forgive an account for a specific match failure 71 |- 72 | /markets || GET || display status information for all markets 73 |- 74 | /market/{marketID} || GET || display status information for a specific market 75 |- 76 | /market/{marketID}/orderbook || GET || display the current order book for a specific market 77 |- 78 | /market/{marketID}/epochorders || GET || display current epoch orders for a specific market 79 |- 80 | /market/{marketID}/matches?includeinactive=BOOL || GET || display active matches for a specific market. If includeinactive, completed matches are also returned 81 |- 82 | /market/{marketID}/suspend?t=EPOCH-MS&persist=BOOL || GET || schedule a market suspension at the end of the current epoch or the first epoch after t has elapsed. If persist, booked orders are saved and reinstated upon resumption. Default is true 83 |- 84 | /market/{marketID}/resume?t=EPOCH-MS || GET || schedule a market resumption at the end of the current epoch or the first epoch after t has elapsed 85 |- 86 | /notifyall || POST || send a notification containing text in the request body to all connected clients. Header Content-Type must be set to "text/plain" 87 |}