Custody
get
https://api.sfox.com/v1
/whitelisted-addresses
Fetching whitelisted withdrawal addresses

Response Body

Key
Description
alias
Custom alias you have assigned to the address
address
Whitelisted withdraw address
currency_symbol
Currency that can be withdrawn to the address
date_created
ISO date string
date_updated
ISO date string
Shell
NodeJS
Python
1
curl -H 'Authorization: Bearer <API_TOKEN>' \
2
https://api.sfox.com/v1/whitelisted-addresses
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'get',
5
url: 'https://api.sfox.com/v1/whitelisted-addresses',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
}
9
}).then(response => {
10
console.log(response)
11
}).catch(err => {
12
console.error(err)
13
});
Copied!
1
import requests
2
3
data = requests.get(
4
"https://api.sfox.com/v1/whitelisted-addresses",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
}
8
)
9
print(data)
Copied!
post
https://api.sfox.com/v1
/whitelisted-addresses
Create whitelist withdrawal address
Shell
NodeJS
Python
1
curl -X POST \
2
-H 'Content-type: application/json' \
3
-H 'Authorization: Bearer < API_TOKEN >' \
4
--data '{ "alias": "Satoshis Fund",
5
"currency_symbol": "btc",
6
"address": "1NLqQmwkGxxQmzS9uwtCGXxbxrcNW4FpYp" }' \
7
https://api.sfox.com/v1/whitelisted-addresses
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'post',
5
url: 'https://api.sfox.com/v1/whitelisted-addresses',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
},
9
data: {
10
alias: 'Satoshis Fund',
11
currency_symbol: 'btc',
12
address: '1NLqQmwkGxxQmzS9uwtCGXxbxrcNW4FpYp'
13
}
14
}).then(response => {
15
console.log(response)
16
}).catch(err => {
17
console.error(err)
18
});
Copied!
1
import requests
2
3
data = requests.post(
4
"https://api.sfox.com/v1/whitelisted-addresses",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
},
8
data={
9
"alias": "Satoshis Fund",
10
"currency_symbol": "btc",
11
"address": "1NLqQmwkGxxQmzS9uwtCGXxbxrcNW4FpYp"
12
}
13
)
14
print(data)
Copied!
get
https://api.sfox.com/v1
/approval-rules
Fetching account approval rules
Shell
NodeJS
Python
1
curl -H 'Authorization: Bearer <API_TOKEN>' \
2
https://api.sfox.com/v1/approval-rules
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'get',
5
url: 'https://api.sfox.com/v1/approval-rules',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
}
9
}).then(response => {
10
console.log(response)
11
}).catch(err => {
12
console.error(err)
13
});
Copied!
1
import requests
2
3
data = requests.get(
4
"https://api.sfox.com/v1/approval-rules",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
}
8
)
9
print(data)
Copied!
post
https://api.sfox.com/v1
/approval-rules
Creating approval rules
Shell
NodeJS
Python
1
curl -X POST \
2
-H 'Content-type: application/json' \
3
-H 'Authorization: Bearer <API_TOKEN>' \
4
--data '{ "rule_type": "WITHDRAW",
5
"required_approvals": 2,
6
"threshold": 100 }' \
7
https://api.sfox.com/v1/approval-rules
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'post',
5
url: 'https://api.sfox.com/v1/approval-rules',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
},
9
data: {
10
rule_type: "WITHDRAW",
11
required_approvals: 2,
12
threshold: 100
13
}
14
}).then(response => {
15
console.log(response)
16
}).catch(err => {
17
console.error(err)
18
});
Copied!
1
import requests
2
3
data = requests.post(
4
"https://api.sfox.com/v1/approval-rules",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
},
8
data={
9
"rule_type": "WITHDRAW",
10
"required_approvals": 2,
11
"threshold": 100
12
}
13
)
14
print(data)
Copied!
patch
https://api.sfox.com/v1
/approval-rules/:id
Editing approval rules
Shell
NodeJS
Python
1
curl -X PATCH \
2
-H 'Content-type: application/json' \
3
-H 'Authorization: Bearer <API_TOKEN>' \
4
--data '{ "required_approvals": 3 , "threshold": 500 }' \
5
https://api.sfox.com/v1/approval-rules/1
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'patch',
5
url: 'https://api.sfox.com/v1/approval-rules/1',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
},
9
data: {
10
required_approvals: 3 ,
11
threshold: 500
12
}
13
}).then(response => {
14
console.log(response)
15
}).catch(err => {
16
console.error(err)
17
});
Copied!
1
import requests
2
3
data = requests.patch(
4
"https://api.sfox.com/v1/approval-rules/1",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
},
8
data={
9
"required_approvals": 3,
10
"threshold": 500
11
}
12
)
13
print(data)
Copied!
get
https://api.sfox.com/v1
/approvals
Fetching approval requests
Shell
NodeJS
Python
1
curl -H 'Authorization: Bearer <API_TOKEN>' \
2
https://api.sfox.com/v1/approvals
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'get',
5
url: 'https://api.sfox.com/v1/approvals',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
}
9
}).then(response => {
10
console.log(response)
11
}).catch(err => {
12
console.error(err)
13
});
Copied!
1
import requests
2
3
data = requests.get(
4
"https://api.sfox.com/v1/approvals",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
}
8
)
9
print(data)
Copied!
post
https://api.sfox.com/v1
/approvals/:id
Responding to an approval request
Shell
NodeJS
Python
1
curl -X POST \
2
-H 'Content-type: application/json' \
3
-H 'Authorization: Bearer <API_TOKEN>' \
4
--data '{ "approve": true}' \
5
https://api.sfox.com/v1/approvals/1
Copied!
1
const axios = require('axios');
2
3
axios({
4
method: 'post',
5
url: 'https://api.sfox.com/v1/approvals/1',
6
headers: {
7
'Authorization': 'Bearer <API_KEY>'
8
},
9
data: {
10
approve: true
11
}
12
}).then(response => {
13
console.log(response)
14
}).catch(err => {
15
console.error(err)
16
});
Copied!
1
import requests
2
3
data = requests.post(
4
"https://api.sfox.com/v1/approvals/1",
5
headers={
6
"Authorization": "Bearer <API_KEY>",
7
},
8
data={
9
"approve": True
10
}
11
)
12
print(data)
Copied!