API

get
Get Plugins

https://<API_URL>/plugins
Get installed plugins for your exchange
Request
Response
Request
Response
200: OK
{
"count": 6,
"data": [
{
"name": "hello-exchange",
"version": 1,
"enabled": true,
"author": "bitHolla",
"description": "tester",
"bio": null,
"url": null,
"logo": null,
"icon": null,
"documentation": null,
"created_at": "2020-12-23T16:56:05.471Z",
"updated_at": "2020-12-23T16:56:05.471Z"
},
...
]
}

get
Get Plugin

https://<API_URL>/plugins
Get a single plugin
Request
Response
Request
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"name": "sms",
"version": 1,
"enabled": true,
"author": "bitHolla",
"description": "Verify your users by SMS without making them deal with verification codes.",
"bio": "SMS functionality using AWS SNS",
"url": null,
"logo": "https://bitholla.s3.ap-northeast-2.amazonaws.com/plugins/sms-thumbnail.png",
"icon": "https://bitholla.s3.ap-northeast-2.amazonaws.com/plugins/sms-icon.png",
"documentation": null,
"web_view": null,
"created_at": "2020-12-28T15:43:22.421Z",
"updated_at": "2021-02-18T06:29:11.987Z",
"enabled_admin_view": false
}

get
Get Plugin Script

https://<API_URL>/plugins/script
Get the script, prescript, postscript, and admin_view for a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"name": "hello-exchange",
"version": 1,
"script": "const helloWorld=installedLibraries[\"hello-world-npm\"];app.get(\"/plugins/hello-exchange\",(e,l)=>l.json({message:\"Hello Exchange\",other:helloWorld(),meta:meta}));",
"prescript": {
"run": null,
"install": [
"hello-world-npm"
]
},
"postscript": {
"run": null
},
"admin_view": null
}

post
Install Plugin

https://<API_URL>/plugins
Install a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Body Parameters
public_meta
optional
object
Plugin public_meta object
type
optional
string
Plugin type
enabled
required
boolean
Enable/disable the plugin on installation
name
required
string
Name of plugin
version
required
number
Plugin version
script
required
string
Plugin script
meta
optional
object
Plugin meta object
prescript
optional
object
Plugin prescript object. Valid keys: install, run
postscript
optional
object
Plugin postscript object. Valid keys: run
icon
optional
string
Plugin icon url
documentation
optional
string
Plugin markdown documentation
url
optional
string
Plugin url
bio
optional
string
Plugin simplified bio
logo
optional
string
Plugin logo url
description
optional
string
Plugin long description
author
optional
string
Plugin author
admin_view
optional
string
Plugin admin_view
web_view
optional
string
Plugin web_view
Response
200: OK
{
"name": "hello-exchange",
"version": 1,
"author": "bitHolla",
"enabled": true,
"description": "Demo plugin for proof of concept",
"bio": "Demo plugin",
"public_meta": { ... },
"web_view": null,
"updated_at": "2021-03-08T04:06:03.357Z",
"created_at": "2021-03-08T04:06:03.357Z",
"documentation": null,
"logo": null,
"icon": null,
"url": null,
"enabled_admin_view": false
}

put
Update Plugin

https://<API_URL>/plugins
Update a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Body Parameters
public_meta
optional
string
Updated public_meta object
type
optional
string
Plugin type
name
required
string
Name of plugin to update
version
required
number
New version. Must be different than one installed
script
optional
string
Updated script
meta
optional
object
Updated meta object
prescript
optional
string
Updated prescript object
postscript
optional
string
Updated postscript object
icon
optional
string
Updated icon
documentation
optional
string
Updated documentation
url
optional
string
Updated url
bio
optional
string
Updated bio
logo
optional
string
Updated logo
description
optional
string
Updated description
author
optional
string
Updated author
admin_view
optional
string
Updated admin_view
web_view
optional
string
Updated web_view
Response
200: OK
{
"version": 2,
"name": "hello-exchange",
"enabled": true,
"type": null,
"public_meta": { ... },
"author": "bitHolla",
"bio": "Demo plugin",
"description": "Demo plugin for proof of concept",
"documentation": null,
"logo": null,
"icon": null,
"url": null,
"web_view": null,
"created_at": "2021-03-08T04:06:03.357Z",
"updated_at": "2021-03-08T04:09:35.642Z",
"enabled_admin_view": false
}

delete
Uninstall Plugin

https://<API_URL>/plugins
Uninstall a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"message": "Success"
}

get
Enable Plugin

https://<API_URL>/plugins/enable
Enable an installed plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"message": "Success"
}

get
Disable Plugin

https://<API_URL>/plugins/disable
Disable an installed plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"message": "Success"
}

get
Get Plugin Meta

https://<API_URL>/plugins/meta
Get public_meta and meta objects for a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Query Parameters
name
required
string
Name of plugin
Response
200: OK
{
"name": "kyc",
"version": 1,
"meta": {...},
"public_meta": {...}
}

put
Update Plugin Meta

https://<API_URL>/plugins/meta
Update the public_meta and/or meta object for a plugin
Request
Response
Request
Headers
authorization
required
string
Bearer token
Body Parameters
name
required
string
Name of plugin to update
public_meta
optional
object
Updated public_meta object (one of public_meta or meta required)
meta
optional
object
Updated meta object (one of public_meta or meta required)
Response
200: OK
{
"message": "Success"
}