POST
/
requests
/
sell
curl --request POST \
  --url https://api.pipevest.com/v1/requests/sell \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Digest: <content-digest>' \
  --header 'Content-Type: application/json' \
  --header 'Signature: <signature>' \
  --header 'Signature-Input: <signature-input>' \
  --header 'X-Client-Id: <x-client-id>' \
  --header 'X-Idempotency-Id: <x-idempotency-id>' \
  --data '{
  "customerId": 123456,
  "assetId": 123456,
  "currency": "ZK",
  "sellAmount": 1550,
  "sellPercentage": 50,
  "isRecurring": false,
  "schedule": "ONCE"
}'
{
  "data": {
    "requestId": 123456,
    "assetId": 123456,
    "customerId": 123456,
    "symbol": "APPL",
    "requestType": "SELL",
    "status": "PENDING",
    "currency": "ZK",
    "isRecurring": false,
    "schedule": "ONCE",
    "sellAmount": 1550,
    "sellPercentage": 50,
    "createdAt": 1234567890,
    "updatedAt": 1234567890
  },
  "code": 201,
  "message": "Created"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Signature
string
required

Base64 encoded signed hash of the http message request components.

Learn how signatures work

Example:

"sig1=:OTEyMjY4...A5NTNDMEQ=:"

Signature-Input
string
required

An ordered list of components that make up the signature base. It is used to recompute and verify the Signature

Learn how signatures work

Example:

"sig1=(\"Content-Type\" \"Content-Digest\" \"Content-Length\" \"Authorization\" \"X-Client-Id\" \"X-Idempotency-Key\" \"@method\" \"@target-uri\" \"@path\" \"@query\");keyid=\"staging-pipevest-ed25519\";created=1732893484;expires=1732893584"

X-Client-Id
string
required

Unique identifier assigned to the client

Example:

"client-id"

Content-Digest
string
required

Base64 encoded sha-512 hash of the http message body.

This key isn't not required for GET and DELETE requests.

Learn how to generate content digest

Example:

"sha-512=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:"

X-Idempotency-Id
string
required

Unique identifier passed into each a mutable request (i.e POST, PUT, PATCH, DELETE)

This key isn't not required for GET requests

Example:

"01937261-e216-754f-99ba-c1170d65dd28"

Body

application/json

Details used to create a sell asset request

Sell Request Payload

Response

201
application/json

Details of a created customer asset sell request

The response is of type object.