Package nxt.http
Class CurrencySell
- java.lang.Object
-
- nxt.http.APIServlet.APIRequestHandler
-
- nxt.http.CurrencySell
-
public final class CurrencySell extends APIServlet.APIRequestHandler
Sell currency for NXTParameters
- currency - currency id
- rateNQT - exchange rate between NXT amount and currency units
- units - number of units to sell
currency sell transaction attempts to match existing exchange offers. When a match is found, the minimum number of units between the number of units offered and the units requested are exchanged at a rate matching the lowest buy offer
A single transaction can match multiple buy offers or none. Unlike asset ask order, currency sell is not saved. It's either executed immediately (fully or partially) or not executed at all. For every match between buyer and seller an exchange record is saved, exchange records can be retrieved using theGetExchanges
API
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
allowRequiredBlockParameters()
static java.util.List<java.lang.String>
getCommonParameters()
protected org.json.simple.JSONStreamAware
processRequest(javax.servlet.http.HttpServletRequest req)
protected boolean
requirePost()
-
Methods inherited from class nxt.http.APIServlet.APIRequestHandler
getAPITags, getFileParameter, getParameters, isPassword, isTextArea, processRequest, requireBlockchain, requireFullClient, requirePassword, startDbTransaction
-
-
-
-
Method Detail
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req) throws NxtException
- Specified by:
processRequest
in classAPIServlet.APIRequestHandler
- Throws:
NxtException
-
requirePost
protected final boolean requirePost()
- Overrides:
requirePost
in classAPIServlet.APIRequestHandler
-
allowRequiredBlockParameters
protected final boolean allowRequiredBlockParameters()
- Overrides:
allowRequiredBlockParameters
in classAPIServlet.APIRequestHandler
-
getCommonParameters
public static java.util.List<java.lang.String> getCommonParameters()
-
-