Placing LIMIT orders does not work. Processing goroutine at endpoint crashes.
Hi,
First of all, the documentation (https://python-docs.nash.io/api-documentation.html#nash.api.NashApi.place_limit_order) has an error. place_limit_order()
does expect the order amount as type nash.nash_core.CurrencyAmount
, but the sample given in the documentation just passes a string.
Second, I cannot place an order via the API, because the API endpoint crashes with a nil pointer dereference:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x6f2859d6]
goroutine 17 [running, locked to thread]:
gitlab.com/nash-io/blockchain/crypto-core-go/nash.getNeoScriptHash(0xc0000854a0, 0x249249249249, 0x39, 0x8, 0x6f19fa56, 0xc00039e410)
C:/Users/me/crypto-core-go/crypto-core-go-master/nash/blockchain.go:282 +0x66
gitlab.com/nash-io/blockchain/crypto-core-go/nash.createNEOOrderSignatureData(0xc0000854a0, 0x6f4c90c0, 0xc000268000, 0xc0000a2ab3, 0x3, 0x300000000, 0x1, 0x4, 0xc0000a2a60, 0x1)
C:/Users/me/crypto-core-go/crypto-core-go-master/nash/blockchain_neo.go:37 +0x4a
gitlab.com/nash-io/blockchain/crypto-core-go/nash.signBlockchainSpecificData(0xc0000854a0, 0x6f4c90c0, 0xc000268000, 0x6f4c90c0, 0xc000268000, 0x1)
C:/Users/me/crypto-core-go/crypto-core-go-master/nash/blockchain.go:58 +0x618
gitlab.com/nash-io/blockchain/crypto-core-go/nash.SignPayload(0xc0000854a0, 0x6f4c6a00, 0xc000268000, 0x6f2fd4c0, 0xc0000854a0, 0x0)
C:/Users/me/crypto-core-go/crypto-core-go-master/nash/nash.go:225 +0x461
main.SignPayload(0x2257dd39e10, 0x2257d999910, 0xc00018de38)
C:/Users/me/crypto-core-go/crypto-core-go-master/shared/nash.go:206 +0x205
main._cgoexpwrap_76a8a1d6a708_SignPayload(0x2257dd39e10, 0x2257d999910, 0x0)
_cgo_gotypes.go:151 +0x79
I did the following API call:
API.place_limit_order("gas_neo", nash_core.CurrencyAmount("0.42", "gas"), "SELL", "GOOD_TIL_CANCELLED", "0.168", allow_taker=False)
By the way, security best practices recommend not to disclose internal information, such as stack traces and internal file system paths!