hutPortal API

post
orderHash and Signature

https://portal.hut34.io/orderHash
Post all variables needed to make a valid 0x object and backend is creating an orderHash and signing it. Returns the valid makerAssetData and takerAssetData, signature and orderHash. EVERY VARIABLE IS A STRING.
Request
Response
Body Parameters
makerUID
optional
string
userID from google sign in
takerAssetAmount
optional
string
Anything as it is NOTCOIN
takerAssetData
optional
string
takerFee
optional
string
salt
optional
string
senderAddress
optional
string
takerAddress
optional
string
exchangeAddress
optional
string
expirationTimeSeconds
optional
string
feeRecipientAddress
optional
string
makerAddress
optional
string
makerAssetAmount
optional
string
makerAssetData
optional
string
makerFee
optional
string
200: OK
When receiving the response, I delete the field makerUID and add the orderHash, makerAssetData, takerAssetDdata and signature. here's a hutX Request sent to firestore, including a valid 0x object.
{
"orderHash":"0x7b0e8dd18b2600823f838b7c65a0b52fbb1e9165e7b09e4dee8fc0b651e26ffb",
"dataRequest":"Where can I sell ENTRP ?",
"makerUID":"RpzFNZmTKpO0Aogi2Bvk9ucKbCP2",
"orderDetails":{
"exchangeAddress":"0x4f833a24e1f95d70f028921e27040ca56e09ab0b",
"expirationTimeSeconds":"1549554416", // timestamp when the order will be cancelled by itself
"feeRecipientAddress":"0x89db81c2dc4adaf10a93705b69289d479d576635",
"makerAddress":"0xd8c820a5011fb0b63947d1719d1b8b5651a9d626",
"makerAssetAmount":"990000000000000000",
"makerAssetData":"0xf47261b00000000000000000000000005bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3",
"makerFee":"0",
"salt":"1546962416341", // random number, I am using the timestamp in milliseconds, but can use anything random
"senderAddress":"0x0000000000000000000000000000000000000000",
"takerAddress":"0x0000000000000000000000000000000000000000",
"takerAssetAmount":"1000000000000000000",
"takerAssetData":"0xf47261b00000000000000000000000000027449bf0887ca3e431d263ffdefb244d95b555",
"takerFee":"0",
"orderHash":"0x7b0e8dd18b2600823f838b7c65a0b52fbb1e9165e7b09e4dee8fc0b651e26ffb",
"signature":"0x1c55c438b1f825fadaa1640a1cb893a45969badb5919d96dfb5ebaf5ecd0f50f6a14058e915b98e402a5a2a6f65bee0d267bcc384bad168fed9abbdc66783ce29703"
},
"referenceID":"XndZpdVBCK1WhEfH9c7h"
}

post
Create an Ethereum Address

https://portal.hut34.io/createAddress
Creates an address that is linked to the google account. Used to generate order and filling order. In the backend, I use Hut34 wallet API, but I doubt that it will affect the front-end.
Request
Response
Body Parameters
uid
optional
string
user ID from google sign in
200: OK
Returns the address created.
result = "0x........"

post
Delete Request

https://portal.hut34.io/deleteRequest
As a maker, you can delete your request (delete it from our firestore) only if the request hasn't been answered yet.
Request
Response
Body Parameters
uid
optional
string
userID from google sign in
refID
optional
string
referenceID of the hutX Request
200: OK
returns success or nothing
result = true when the request has been deleted successfully.

post
Send dust ETH to the account

https://portal.hut34.io/users/sendETH
Funds the account once only to post several requests and getting approved. For portal users only. In the backend, it sends ETH to the address and approves ENTRP. fully automated.
Request
Response
Body Parameters
uid
optional
string
userID from google sign in
200: OK
if(results === "true" ) {
alert("Your account has already been funded once.");
}
else {
alert("Track the transaction Hash at " + results);
}

post
Send 5 ENTRP to ethAddress

https://portal.hut34.io/users/sendENTRP
Fund the address once in ENTRP to generate and fill Order. For portal users only.
Request
Response
Body Parameters
uid
optional
string
userID from google sign in
200: OK
if(results === "true") {
alert("Your account has already been funded once");
}
else {
alert("Track the transaction Hash at " + results);
}