async def create_order(self, symbol, type, side, amount, price=None, params={}):
    self.check_required_dependencies()
    if (self.apiKey is None):
        raise ArgumentsRequired('createOrder() requires self.apiKey or userid in params')
    (await self.load_markets())
    market = self.market(symbol)
    sideNum = None
    typeNum = None
    if (side == 'sell'):
        sideNum = 1
    else:
        sideNum = 2
    if (type == 'limit'):
        typeNum = 1
    else:
        typeNum = 2
        price = 0
    normalSymbol = market['normalSymbol']
    baseId = market['baseId']
    baseCurrency = self.currency(market['base'])
    amountTruncated = self.amount_to_precision(symbol, amount)
    amountChain = self.toWei(amountTruncated, baseCurrency['precision'])
    amountChainString = self.number_to_string(amountChain)
    quoteId = market['quoteId']
    quoteCurrency = self.currency(market['quote'])
    priceRounded = self.price_to_precision(symbol, price)
    priceChain = self.toWei(priceRounded, quoteCurrency['precision'])
    priceChainString = self.number_to_string(priceChain)
    now = self.milliseconds()
    expiryDelta = self.safe_integer(self.options, 'orderExpiration', 31536000000)
    expiration = (self.milliseconds() + expiryDelta)
    datetime = self.iso8601(now)
    datetime = datetime.split('.')[0]
    expirationDatetime = self.iso8601(expiration)
    expirationDatetime = expirationDatetime.split('.')[0]
    defaultDappId = 'Sagittarius'
    dappId = self.safe_string(params, 'dappId', defaultDappId)
    defaultFee = self.safe_string(self.options, 'fee', '300000000000000')
    totalFeeRate = self.safe_string(params, 'totalFeeRate', 8)
    chainFeeRate = self.safe_string(params, 'chainFeeRate', 1)
    fee = self.safe_string(params, 'fee', defaultFee)
    eightBytes = Precise.stringPow('2', '64')
    allByteStringArray = [self.number_to_be(1, 32), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(32, 1), self.number_to_le(0, 8), self.number_to_le(fee, 8), self.number_to_le(len(self.apiKey), 1), self.encode(self.apiKey), self.number_to_le(sideNum, 1), self.number_to_le(typeNum, 1), self.number_to_le(len(normalSymbol), 1), self.encode(normalSymbol), self.number_to_le(Precise.string_div(amountChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(amountChainString, eightBytes), 8), self.number_to_le(Precise.string_div(priceChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(priceChainString, eightBytes), 8), self.number_to_le(0, 2), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(chainFeeRate), 2), self.number_to_le(1, 1), self.number_to_le(int(totalFeeRate), 2), self.number_to_le(int(quoteId), 4), self.number_to_le(int(baseId), 4), self.number_to_le(0, 1), self.number_to_le(1, 1), self.number_to_le(len(dappId), 1), self.encode(dappId), self.number_to_le(0, 1)]
    txByteStringArray = [self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(32, 1), self.number_to_le(0, 8), self.number_to_le(fee, 8), self.number_to_le(len(self.apiKey), 1), self.encode(self.apiKey), self.number_to_le(sideNum, 1), self.number_to_le(typeNum, 1), self.number_to_le(len(normalSymbol), 1), self.encode(normalSymbol), self.number_to_le(Precise.string_div(amountChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(amountChainString, eightBytes), 8), self.number_to_le(Precise.string_div(priceChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(priceChainString, eightBytes), 8), self.number_to_le(0, 2), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(chainFeeRate), 2), self.number_to_le(1, 1), self.number_to_le(int(totalFeeRate), 2), self.number_to_le(int(quoteId), 4), self.number_to_le(int(baseId), 4), self.number_to_le(0, 1), self.number_to_le(1, 1), self.number_to_le(len(dappId), 1), self.encode(dappId), self.number_to_le(0, 1)]
    txbytestring = self.binary_concat_array(txByteStringArray)
    txidhash = self.hash(txbytestring, 'sha256', 'hex')
    txid = txidhash[0:40]
    orderidByteStringArray = [self.number_to_le(len(txid), 1), self.encode(txid), self.number_to_be(0, 4)]
    orderidbytestring = self.binary_concat_array(orderidByteStringArray)
    orderidhash = self.hash(orderidbytestring, 'sha256', 'hex')
    orderid = orderidhash[0:40]
    bytestring = self.binary_concat_array(allByteStringArray)
    hash = self.hash(bytestring, 'sha256', 'hex')
    signature = self.ecdsa(hash, self.secret, 'secp256k1', None, True)
    recoveryParam = self.binary_to_base16(self.number_to_le(self.sum(signature['v'], 31), 1))
    mySignature = ((recoveryParam + signature['r']) + signature['s'])
    operation = {'now': datetime, 'expiration': expirationDatetime, 'fee': fee, 'creator': self.apiKey, 'side': sideNum, 'order_type': typeNum, 'market_name': normalSymbol, 'amount': amountChain, 'price': priceChain, 'use_btt_as_fee': False, 'money_id': int(quoteId), 'stock_id': int(baseId), 'custom_no_btt_fee_rate': int(totalFeeRate), 'custom_btt_fee_rate': int(chainFeeRate)}
    fatty = {'timestamp': datetime, 'expiration': expirationDatetime, 'operations': [[32, operation]], 'validate_type': 0, 'dapp': dappId, 'signatures': [mySignature]}
    request = {'trObj': self.json(fatty)}
    response = (await self.publicPostTransactionCreateorder(request))
    timestamp = self.milliseconds()
    statusCode = self.safe_string(response, 'code')
    status = ('open' if (statusCode == '0') else 'failed')
    return {'info': response, 'id': orderid, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'lastTradeTimestamp': None, 'status': status, 'symbol': None, 'type': None, 'side': None, 'price': None, 'amount': None, 'filled': None, 'remaining': None, 'cost': None, 'trades': None, 'fee': None, 'clientOrderId': None, 'average': None}
async def create_order(self, symbol, type, side, amount, price=None, params={}):
    self.check_required_dependencies()
    if (self.apiKey is None):
        raise ArgumentsRequired('createOrder() requires self.apiKey or userid in params')
    (await self.load_markets())
    market = self.market(symbol)
    sideNum = None
    typeNum = None
    if (side == 'sell'):
        sideNum = 1
    else:
        sideNum = 2
    if (type == 'limit'):
        typeNum = 1
    else:
        typeNum = 2
        price = 0
    normalSymbol = market['normalSymbol']
    baseId = market['baseId']
    baseCurrency = self.currency(market['base'])
    amountTruncated = self.amount_to_precision(symbol, amount)
    amountChain = self.toWei(amountTruncated, baseCurrency['precision'])
    amountChainString = self.number_to_string(amountChain)
    quoteId = market['quoteId']
    quoteCurrency = self.currency(market['quote'])
    priceRounded = self.price_to_precision(symbol, price)
    priceChain = self.toWei(priceRounded, quoteCurrency['precision'])
    priceChainString = self.number_to_string(priceChain)
    now = self.milliseconds()
    expiryDelta = self.safe_integer(self.options, 'orderExpiration', 31536000000)
    expiration = (self.milliseconds() + expiryDelta)
    datetime = self.iso8601(now)
    datetime = datetime.split('.')[0]
    expirationDatetime = self.iso8601(expiration)
    expirationDatetime = expirationDatetime.split('.')[0]
    defaultDappId = 'Sagittarius'
    dappId = self.safe_string(params, 'dappId', defaultDappId)
    defaultFee = self.safe_string(self.options, 'fee', '300000000000000')
    totalFeeRate = self.safe_string(params, 'totalFeeRate', 8)
    chainFeeRate = self.safe_string(params, 'chainFeeRate', 1)
    fee = self.safe_string(params, 'fee', defaultFee)
    eightBytes = Precise.stringPow('2', '64')
    allByteStringArray = [self.number_to_be(1, 32), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(32, 1), self.number_to_le(0, 8), self.number_to_le(fee, 8), self.number_to_le(len(self.apiKey), 1), self.encode(self.apiKey), self.number_to_le(sideNum, 1), self.number_to_le(typeNum, 1), self.number_to_le(len(normalSymbol), 1), self.encode(normalSymbol), self.number_to_le(Precise.string_div(amountChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(amountChainString, eightBytes), 8), self.number_to_le(Precise.string_div(priceChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(priceChainString, eightBytes), 8), self.number_to_le(0, 2), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(chainFeeRate), 2), self.number_to_le(1, 1), self.number_to_le(int(totalFeeRate), 2), self.number_to_le(int(quoteId), 4), self.number_to_le(int(baseId), 4), self.number_to_le(0, 1), self.number_to_le(1, 1), self.number_to_le(len(dappId), 1), self.encode(dappId), self.number_to_le(0, 1)]
    txByteStringArray = [self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(32, 1), self.number_to_le(0, 8), self.number_to_le(fee, 8), self.number_to_le(len(self.apiKey), 1), self.encode(self.apiKey), self.number_to_le(sideNum, 1), self.number_to_le(typeNum, 1), self.number_to_le(len(normalSymbol), 1), self.encode(normalSymbol), self.number_to_le(Precise.string_div(amountChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(amountChainString, eightBytes), 8), self.number_to_le(Precise.string_div(priceChainString, eightBytes, 0), 8), self.number_to_le(Precise.string_mod(priceChainString, eightBytes), 8), self.number_to_le(0, 2), self.number_to_le(int(math.floor((now / 1000))), 4), self.number_to_le(int(math.floor((expiration / 1000))), 4), self.number_to_le(1, 1), self.number_to_le(int(chainFeeRate), 2), self.number_to_le(1, 1), self.number_to_le(int(totalFeeRate), 2), self.number_to_le(int(quoteId), 4), self.number_to_le(int(baseId), 4), self.number_to_le(0, 1), self.number_to_le(1, 1), self.number_to_le(len(dappId), 1), self.encode(dappId), self.number_to_le(0, 1)]
    txbytestring = self.binary_concat_array(txByteStringArray)
    txidhash = self.hash(txbytestring, 'sha256', 'hex')
    txid = txidhash[0:40]
    orderidByteStringArray = [self.number_to_le(len(txid), 1), self.encode(txid), self.number_to_be(0, 4)]
    orderidbytestring = self.binary_concat_array(orderidByteStringArray)
    orderidhash = self.hash(orderidbytestring, 'sha256', 'hex')
    orderid = orderidhash[0:40]
    bytestring = self.binary_concat_array(allByteStringArray)
    hash = self.hash(bytestring, 'sha256', 'hex')
    signature = self.ecdsa(hash, self.secret, 'secp256k1', None, True)
    recoveryParam = self.binary_to_base16(self.number_to_le(self.sum(signature['v'], 31), 1))
    mySignature = ((recoveryParam + signature['r']) + signature['s'])
    operation = {'now': datetime, 'expiration': expirationDatetime, 'fee': fee, 'creator': self.apiKey, 'side': sideNum, 'order_type': typeNum, 'market_name': normalSymbol, 'amount': amountChain, 'price': priceChain, 'use_btt_as_fee': False, 'money_id': int(quoteId), 'stock_id': int(baseId), 'custom_no_btt_fee_rate': int(totalFeeRate), 'custom_btt_fee_rate': int(chainFeeRate)}
    fatty = {'timestamp': datetime, 'expiration': expirationDatetime, 'operations': [[32, operation]], 'validate_type': 0, 'dapp': dappId, 'signatures': [mySignature]}
    request = {'trObj': self.json(fatty)}
    response = (await self.publicPostTransactionCreateorder(request))
    timestamp = self.milliseconds()
    statusCode = self.safe_string(response, 'code')
    status = ('open' if (statusCode == '0') else 'failed')
    return {'info': response, 'id': orderid, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'lastTradeTimestamp': None, 'status': status, 'symbol': None, 'type': None, 'side': None, 'price': None, 'amount': None, 'filled': None, 'remaining': None, 'cost': None, 'trades': None, 'fee': None, 'clientOrderId': None, 'average': None}