Points (REST)

Endpoint

Real Server : https://api.finenex.net/v1

Test Server : https://test1-api.finenex.net/v1

Authentication

To make a request, you need to include the JWT in the HTTP header. JWT can be received through the authentication server.

Example

If JWT is "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NDgyMDc1OTIsImlhdCI6MTY0ODEyMTE5Mn0.AYNcBLhKqtqwzxNm7kOREEUH0_3gFevOXxI94TBORao",

curl -X 'POST' \
  '{endpoint}/nlp/issue' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NDgyMDc1OTIsImlhdCI6MTY0ODEyMTE5Mn0.AYNcBLhKqtqwzxNm7kOREEUH0_3gFevOXxI94TBORao' \
  -H 'Content-Type: application/json' \
  -d '{
  "tokenAmount": "10"
}'

API References

Issue

If tranNo, amount, and the token name of recently issued points are the same, it is treated as a duplicate issuance and is failed.

Example

curl -X 'POST' \
  '{endpoint}/points/nlp/issue' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NTIyNzgxNTgsImlhdCI6MTY1MjE5MTc1OH0.MqMd26110LlpuVrY-17so_WJ0icVlom0iqbp_0dVo58' \
  -H 'Content-Type: application/json' \
  -d '{
  "tokenAmount": "10",
  "tid": "test01"
}'

Accumulate

Example

curl -X 'POST' \
  '{endpoint}/points/nlp/6500627A723D0000/accumulate' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NTIyNzgxNTgsImlhdCI6MTY1MjE5MTc1OH0.MqMd26110LlpuVrY-17so_WJ0icVlom0iqbp_0dVo58' \
  -H 'Content-Type: application/json' \
  -d '{
  "tokenAmount": "10",
  "userAddress": "user-address"
}'

Status

Example

curl -X 'GET' \
  '{endpoint}/points/nlp/6500627A723D0000/status' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NTIyNzgxNTgsImlhdCI6MTY1MjE5MTc1OH0.MqMd26110LlpuVrY-17so_WJ0icVlom0iqbp_0dVo58'

Cancel

Example

curl -X 'POST' \
  '{endpoint}/points/nlp/6500627A723D0000/cancel' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0MTExQGRzdGEuY29tIiwicm9sZSI6IlJPTEVfU1RPUkUiLCJleHAiOjE2NTIyNzgxNTgsImlhdCI6MTY1MjE5MTc1OH0.MqMd26110LlpuVrY-17so_WJ0icVlom0iqbp_0dVo58' \
  -H 'Content-Type: application/json' \
  -d '{
  "tokenAmount": "10"
}'

The token amount should be the same as when the points are issued.

Error Codes (resCode)

  • 200: Success

  • 400: Bad parameters

  • 401: Unauthenticated

  • 404: Not found

  • 500: Internal server error. Please see resMessage

Last updated