In this wiki it will be explained how to access to the different endpoints from the Stockmind Platform.

Create token Fungible

Create a new Fungible Token

  • POST /v3/tokens-fungible

Request:

curl -X POST -i \
-H 'Content-Type: application/json' \
-d '{
  "name": "Stockmind Token 1",
  "symbol": "STCK1",
  "decimals": "2",
  "initialAmount": "20999999"
}' \
https://your-domain.com/v3/tokens-fungible

Response:

{
  "txHash": "0x34abf404127f11a5b50a49413c57a9ed1261adb2c52a3866e3739b459f625c3e"
}

Transfer token Fungible

Transfer an Fungible token to an email address.

  • POST /v3/transactions-fungible

Request:

curl -X POST -i \
  -H 'Content-Type: application/json' \
  -d '{
    "destination": "username@domain.io",
    "tokenSymbol": "STCK1",
    "amount": "10"
  }' \
  https://your-domain.com/v3/transactions-fungible
  

Response:

HTTP/1.1 201 Created
  Vary: Origin
  Date: Thu, 22 Nov 2018 12:02:57 GMT
  Content-Length: 0
  

Transfer an Fungible token to a Twitter username. The username should be written whithour the @ symbol.

  • POST /v3/transactions-fungible

Request:

curl -X POST -i \
  -H 'Content-Type: application/json' \
  -d '{
    "destination": "StockmindD",
    "tokenSymbol": "STCK1",
    "amount": "20"
  }' \
  https://your-domain.com/v3/transactions-fungible
  

Response:

HTTP/1.1 201 Created
  Vary: Origin
  Date: Thu, 22 Nov 2018 12:02:57 GMT
  Content-Length: 0
  

View all transactions with Fungible Token

Returns all your requested transactions.

  • GET /v3/transactions-fungible

Request:

curl -X GET -i https://your-domain.com/v3/transactions-fungible
      

Response:

[
         {
            "id":"8",
            "direction":"send",
            "pending":false,
            "counterparty":{
               "ethaddr":"0x8538a2b9821aa82a4fcc31a3e5277d526de65f8c"
            },
            "token":"STCK1",
            "decimals":2,
            "amount":{
               "whole":"20",
               "decimal":"00"
            },
            "date":"22/11/2018 12:02:57"
         },
         {
            "id":"3",
            "direction":"receive",
            "pending":false,
            "counterparty":{
               "ethaddr":"0x8cda193791db75e3590e5ee6525a8b32ed696781"
            },
            "token":"STCK1",
            "decimals":2,
            "amount":{
               "whole":"209999",
               "decimal":"99"
            },
            "txHash":"0x34abf404127f11a5b50a49413c57a9ed1261adb2c52a3866e3739b459f625c3e",
            "date":"22/11/2018 11:35:24"
         }
      ]