LogoLogo
SwapKit's websiteRegister for an API Key
  • 🏡Getting started
    • SwapKit's trade offerings
  • 💰Monetization
  • 🤝Partnership
  • SwapKit API
    • Introduction
    • /providers - Request supported chains by a swap provider
    • /tokens - Request supported tokens by a swap provider
    • /quote - Request a trade quote
    • /quote - Understanding the response
    • /chainflip/broker/channel - Opening a Chainflip deposit channel
    • /track - Request the status of a swap
    • /screen - Check AML compliance
    • /price - Lookup token prices
Powered by GitBook
On this page
  • Endpoint
  • Response
  • Important Considerations
  1. SwapKit API

/screen - Check AML compliance

Previous/track - Request the status of a swapNext/price - Lookup token prices

Last updated 1 month ago

Endpoint

Method: POST URL: https://api.swapkit.dev/screen

The /screen endpoint is used to check the Anti-Money Laundering (AML) compliance status of cryptocurrency addresses. It evaluates the risk level of the provided addresses across different blockchain networks using external compliance providers.

The endpoint does not make decisions on whether a trade should proceed or be rejected. Instead, it provides a compliance confirmation that integrators can use to determine whether to allow transactions but any addresses that were previously identified as non-compliant will not receive quotes.

We periodically update our own database of blacklisted addresses sourced from trusted providers, and any /quoterequest that involves them will get an error response. Despite that, you can choose to screen addresses after a quote to see if their status has changed.


Request parameters

The request body should be a JSON object containing:

  • "addresses": A single address (string) or multiple addresses (array of strings).

  • "chains": The blockchain chain ID relevant to each address. You can , where we listed them before. They are standard identification for each chain.

{
  "addresses": "0x2e1c9b2670802fDE14A789071b6703fe29bfbbFF",
  "chains": "1"
}
{
  "addresses": [
    "0x2e1c9b2670802fDE14A789071b6703fe29bfbbFF",
    "bc1qh56gtgsp3j088cwpzdezcg5lptnv869vh8jjf2"
  ],
  "chains": ["1", "bitcoin"]
}

Response

The response contains a boolean field named "isRisky" that indicates whether the provided addresses are flagged for anti-money laundering (AML) concerns.

  • If the value is "isRisky": false, the addresses have passed the compliance check.

  • If the value is "isRisky": true, at least one of the addresses has been flagged for AML concerns.

The response includes other parameters that internally help provide the source of the flag, but "isRisky" aggregates them.

Important Considerations

  1. Screening criteria:

    • The endpoint evaluates all addresses together and returns a single decision.

    • Even if one address is compliant, if any other address in the request is flagged the entire request may receive a true response.

  2. Dynamic compliance checking:

    • Passing a compliance check at one point does not guarantee future compliance.

    • If an address was screened while it had no funds, it should be re-screened after receiving funds, as they may originate from tainted sources.

  3. Decision responsibility:

    • SwapKit does not make the final decision on whether a trade is executed.

    • The integrator using this API is responsible for enforcing compliance policies based on the response.

This endpoint is not meant to be called on every /quote. Instead, you should only screen the addresses involved when the user has indicated intent to swap, before they sign the transaction. All addresses involved in the trade should be included in the request, and they should be re-checked if a new trade is offered or if the balances of the addresses have changed since they last passed AML compliance.


Here is an example request:

curl -X 'POST' \
  'https://api.swapkit.dev/screen' \
  -H 'Content-Type: application/json' \
  -H "x-api-key: YOUR_VARIABLE_HERE" \
  -d '{
    "addresses": [
      "0x2e1c9b2670802fDE14A789071b6703fe29bfbbFF",
      "bc1qh56gtgsp3j088cwpzdezcg5lptnv869vh8jjf2"
    ],
    "chains": ["1", "bitcoin"]
}'```
see them here