GraphQL Admin API Reference

Welcome to the Galoy Admin API reference!

Contact

Galoy developer community

https://chat.galoy.io/

API Endpoints
https://admin-api.staging.galoy.io/graphql

Queries

accountDetailsByAccountId

Response

Returns an AuditedAccount!

Arguments
Name Description
accountId - ID!

Example

Query
query accountDetailsByAccountId($accountId: ID!) {
  accountDetailsByAccountId(accountId: $accountId) {
    coordinates {
      ...CoordinatesFragment
    }
    createdAt
    id
    level
    owner {
      ...AuditedUserFragment
    }
    status
    title
    username
    uuid
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"accountId": 4}
Response
{
  "data": {
    "accountDetailsByAccountId": {
      "coordinates": Coordinates,
      "createdAt": 1592577642,
      "id": "4",
      "level": "ONE",
      "owner": AuditedUser,
      "status": "ACTIVE",
      "title": "abc123",
      "username": Username,
      "uuid": "abc123",
      "wallets": [Wallet]
    }
  }
}

accountDetailsByEmail

Response

Returns an AuditedAccount!

Arguments
Name Description
email - EmailAddress!

Example

Query
query accountDetailsByEmail($email: EmailAddress!) {
  accountDetailsByEmail(email: $email) {
    coordinates {
      ...CoordinatesFragment
    }
    createdAt
    id
    level
    owner {
      ...AuditedUserFragment
    }
    status
    title
    username
    uuid
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"email": "test@test.com"}
Response
{
  "data": {
    "accountDetailsByEmail": {
      "coordinates": Coordinates,
      "createdAt": 1592577642,
      "id": "4",
      "level": "ONE",
      "owner": AuditedUser,
      "status": "ACTIVE",
      "title": "xyz789",
      "username": Username,
      "uuid": "abc123",
      "wallets": [Wallet]
    }
  }
}

accountDetailsByUserPhone

Response

Returns an AuditedAccount!

Arguments
Name Description
phone - Phone!

Example

Query
query accountDetailsByUserPhone($phone: Phone!) {
  accountDetailsByUserPhone(phone: $phone) {
    coordinates {
      ...CoordinatesFragment
    }
    createdAt
    id
    level
    owner {
      ...AuditedUserFragment
    }
    status
    title
    username
    uuid
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"phone": Phone}
Response
{
  "data": {
    "accountDetailsByUserPhone": {
      "coordinates": Coordinates,
      "createdAt": 1592577642,
      "id": "4",
      "level": "ONE",
      "owner": AuditedUser,
      "status": "ACTIVE",
      "title": "xyz789",
      "username": Username,
      "uuid": "xyz789",
      "wallets": [Wallet]
    }
  }
}

accountDetailsByUsername

Response

Returns an AuditedAccount!

Arguments
Name Description
username - Username!

Example

Query
query accountDetailsByUsername($username: Username!) {
  accountDetailsByUsername(username: $username) {
    coordinates {
      ...CoordinatesFragment
    }
    createdAt
    id
    level
    owner {
      ...AuditedUserFragment
    }
    status
    title
    username
    uuid
    wallets {
      ...WalletFragment
    }
  }
}
Variables
{"username": Username}
Response
{
  "data": {
    "accountDetailsByUsername": {
      "coordinates": Coordinates,
      "createdAt": 1592577642,
      "id": "4",
      "level": "ONE",
      "owner": AuditedUser,
      "status": "ACTIVE",
      "title": "xyz789",
      "username": Username,
      "uuid": "abc123",
      "wallets": [Wallet]
    }
  }
}

allLevels

Response

Returns [AccountLevel!]!

Example

Query
query allLevels {
  allLevels
}
Response
{"data": {"allLevels": ["ONE"]}}

lightningInvoice

Response

Returns a LightningInvoice!

Arguments
Name Description
hash - PaymentHash!

Example

Query
query lightningInvoice($hash: PaymentHash!) {
  lightningInvoice(hash: $hash) {
    confirmedAt
    createdAt
    description
    expiresAt
    isSettled
    received
    request
    secretPreImage
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "lightningInvoice": {
      "confirmedAt": 1592577642,
      "createdAt": 1592577642,
      "description": "xyz789",
      "expiresAt": 1592577642,
      "isSettled": false,
      "received": SatAmount,
      "request": LnPaymentRequest,
      "secretPreImage": LnPaymentPreImage
    }
  }
}

lightningPayment

Response

Returns a LightningPayment!

Arguments
Name Description
hash - PaymentHash!

Example

Query
query lightningPayment($hash: PaymentHash!) {
  lightningPayment(hash: $hash) {
    amount
    confirmedAt
    createdAt
    destination
    request
    revealedPreImage
    roundedUpFee
    status
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "lightningPayment": {
      "amount": SatAmount,
      "confirmedAt": 1592577642,
      "createdAt": 1592577642,
      "destination": LnPubkey,
      "request": LnPaymentRequest,
      "revealedPreImage": LnPaymentPreImage,
      "roundedUpFee": SatAmount,
      "status": "FAILED"
    }
  }
}

listWalletIds

Response

Returns [WalletId!]!

Arguments
Name Description
walletCurrency - WalletCurrency!

Example

Query
query listWalletIds($walletCurrency: WalletCurrency!) {
  listWalletIds(walletCurrency: $walletCurrency)
}
Variables
{"walletCurrency": "BTC"}
Response
{"data": {"listWalletIds": [WalletId]}}

transactionById

Response

Returns a Transaction

Arguments
Name Description
id - ID!

Example

Query
query transactionById($id: ID!) {
  transactionById(id: $id) {
    createdAt
    direction
    id
    initiationVia {
      ... on InitiationViaIntraLedger {
        ...InitiationViaIntraLedgerFragment
      }
      ... on InitiationViaLn {
        ...InitiationViaLnFragment
      }
      ... on InitiationViaOnChain {
        ...InitiationViaOnChainFragment
      }
    }
    memo
    settlementAmount
    settlementCurrency
    settlementDisplayAmount
    settlementDisplayCurrency
    settlementDisplayFee
    settlementFee
    settlementPrice {
      ...PriceOfOneSettlementMinorUnitInDisplayMinorUnitFragment
    }
    settlementVia {
      ... on SettlementViaIntraLedger {
        ...SettlementViaIntraLedgerFragment
      }
      ... on SettlementViaLn {
        ...SettlementViaLnFragment
      }
      ... on SettlementViaOnChain {
        ...SettlementViaOnChainFragment
      }
    }
    status
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "transactionById": {
      "createdAt": 1592577642,
      "direction": "RECEIVE",
      "id": "4",
      "initiationVia": InitiationViaIntraLedger,
      "memo": Memo,
      "settlementAmount": SignedAmount,
      "settlementCurrency": "BTC",
      "settlementDisplayAmount": SignedDisplayMajorAmount,
      "settlementDisplayCurrency": DisplayCurrency,
      "settlementDisplayFee": SignedDisplayMajorAmount,
      "settlementFee": SignedAmount,
      "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
      "settlementVia": SettlementViaIntraLedger,
      "status": "FAILURE"
    }
  }
}

transactionsByHash

Response

Returns [Transaction]

Arguments
Name Description
hash - PaymentHash!

Example

Query
query transactionsByHash($hash: PaymentHash!) {
  transactionsByHash(hash: $hash) {
    createdAt
    direction
    id
    initiationVia {
      ... on InitiationViaIntraLedger {
        ...InitiationViaIntraLedgerFragment
      }
      ... on InitiationViaLn {
        ...InitiationViaLnFragment
      }
      ... on InitiationViaOnChain {
        ...InitiationViaOnChainFragment
      }
    }
    memo
    settlementAmount
    settlementCurrency
    settlementDisplayAmount
    settlementDisplayCurrency
    settlementDisplayFee
    settlementFee
    settlementPrice {
      ...PriceOfOneSettlementMinorUnitInDisplayMinorUnitFragment
    }
    settlementVia {
      ... on SettlementViaIntraLedger {
        ...SettlementViaIntraLedgerFragment
      }
      ... on SettlementViaLn {
        ...SettlementViaLnFragment
      }
      ... on SettlementViaOnChain {
        ...SettlementViaOnChainFragment
      }
    }
    status
  }
}
Variables
{"hash": PaymentHash}
Response
{
  "data": {
    "transactionsByHash": [
      {
        "createdAt": 1592577642,
        "direction": "RECEIVE",
        "id": 4,
        "initiationVia": InitiationViaIntraLedger,
        "memo": Memo,
        "settlementAmount": SignedAmount,
        "settlementCurrency": "BTC",
        "settlementDisplayAmount": SignedDisplayMajorAmount,
        "settlementDisplayCurrency": DisplayCurrency,
        "settlementDisplayFee": SignedDisplayMajorAmount,
        "settlementFee": SignedAmount,
        "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
        "settlementVia": SettlementViaIntraLedger,
        "status": "FAILURE"
      }
    ]
  }
}

wallet

Response

Returns a Wallet!

Arguments
Name Description
walletId - WalletId!

Example

Query
query wallet($walletId: WalletId!) {
  wallet(walletId: $walletId) {
    accountId
    balance
    id
    pendingIncomingBalance
    transactions {
      ...TransactionConnectionFragment
    }
    transactionsByAddress {
      ...TransactionConnectionFragment
    }
    walletCurrency
  }
}
Variables
{"walletId": WalletId}
Response
{
  "data": {
    "wallet": {
      "accountId": "4",
      "balance": SignedAmount,
      "id": 4,
      "pendingIncomingBalance": SignedAmount,
      "transactions": TransactionConnection,
      "transactionsByAddress": TransactionConnection,
      "walletCurrency": "BTC"
    }
  }
}

Mutations

accountUpdateLevel

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - AccountUpdateLevelInput!

Example

Query
mutation accountUpdateLevel($input: AccountUpdateLevelInput!) {
  accountUpdateLevel(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": AccountUpdateLevelInput}
Response
{
  "data": {
    "accountUpdateLevel": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

accountUpdateStatus

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - AccountUpdateStatusInput!

Example

Query
mutation accountUpdateStatus($input: AccountUpdateStatusInput!) {
  accountUpdateStatus(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": AccountUpdateStatusInput}
Response
{
  "data": {
    "accountUpdateStatus": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

adminPushNotificationSend

Response

Returns an AdminPushNotificationSendPayload!

Arguments
Name Description
input - AdminPushNotificationSendInput!

Example

Query
mutation adminPushNotificationSend($input: AdminPushNotificationSendInput!) {
  adminPushNotificationSend(input: $input) {
    errors {
      ...ErrorFragment
    }
    success
  }
}
Variables
{"input": AdminPushNotificationSendInput}
Response
{
  "data": {
    "adminPushNotificationSend": {
      "errors": [Error],
      "success": true
    }
  }
}

businessDeleteMapInfo

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - BusinessDeleteMapInfoInput!

Example

Query
mutation businessDeleteMapInfo($input: BusinessDeleteMapInfoInput!) {
  businessDeleteMapInfo(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": BusinessDeleteMapInfoInput}
Response
{
  "data": {
    "businessDeleteMapInfo": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

businessUpdateMapInfo

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - BusinessUpdateMapInfoInput!

Example

Query
mutation businessUpdateMapInfo($input: BusinessUpdateMapInfoInput!) {
  businessUpdateMapInfo(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": BusinessUpdateMapInfoInput}
Response
{
  "data": {
    "businessUpdateMapInfo": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

captchaCreateChallenge

Response

Returns a CaptchaCreateChallengePayload!

Example

Query
mutation captchaCreateChallenge {
  captchaCreateChallenge {
    errors {
      ...ErrorFragment
    }
    result {
      ...CaptchaCreateChallengeResultFragment
    }
  }
}
Response
{
  "data": {
    "captchaCreateChallenge": {
      "errors": [Error],
      "result": CaptchaCreateChallengeResult
    }
  }
}

captchaRequestAuthCode

Response

Returns a SuccessPayload!

Arguments
Name Description
input - CaptchaRequestAuthCodeInput!

Example

Query
mutation captchaRequestAuthCode($input: CaptchaRequestAuthCodeInput!) {
  captchaRequestAuthCode(input: $input) {
    errors {
      ...ErrorFragment
    }
    success
  }
}
Variables
{"input": CaptchaRequestAuthCodeInput}
Response
{
  "data": {
    "captchaRequestAuthCode": {
      "errors": [Error],
      "success": false
    }
  }
}

userLogin

Response

Returns an AuthTokenPayload!

Arguments
Name Description
input - UserLoginInput!

Example

Query
mutation userLogin($input: UserLoginInput!) {
  userLogin(input: $input) {
    authToken
    errors {
      ...ErrorFragment
    }
    totpRequired
  }
}
Variables
{"input": UserLoginInput}
Response
{
  "data": {
    "userLogin": {
      "authToken": AuthToken,
      "errors": [Error],
      "totpRequired": true
    }
  }
}

userRequestAuthCode

Response

Returns a SuccessPayload!

Arguments
Name Description
input - UserRequestAuthCodeInput!

Example

Query
mutation userRequestAuthCode($input: UserRequestAuthCodeInput!) {
  userRequestAuthCode(input: $input) {
    errors {
      ...ErrorFragment
    }
    success
  }
}
Variables
{"input": UserRequestAuthCodeInput}
Response
{
  "data": {
    "userRequestAuthCode": {
      "errors": [Error],
      "success": true
    }
  }
}

userUpdatePhone

Response

Returns an AccountDetailPayload!

Arguments
Name Description
input - UserUpdatePhoneInput!

Example

Query
mutation userUpdatePhone($input: UserUpdatePhoneInput!) {
  userUpdatePhone(input: $input) {
    accountDetails {
      ...AuditedAccountFragment
    }
    errors {
      ...ErrorFragment
    }
  }
}
Variables
{"input": UserUpdatePhoneInput}
Response
{
  "data": {
    "userUpdatePhone": {
      "accountDetails": AuditedAccount,
      "errors": [Error]
    }
  }
}

Types

AccountDetailPayload

Fields
Field Name Description
accountDetails - AuditedAccount
errors - [Error!]!
Example
{
  "accountDetails": AuditedAccount,
  "errors": [Error]
}

AccountLevel

Values
Enum Value Description

ONE

TWO

ZERO

Example
"ONE"

AccountStatus

Values
Enum Value Description

ACTIVE

CLOSED

LOCKED

NEW

PENDING

Example
"ACTIVE"

AccountUpdateLevelInput

Fields
Input Field Description
level - AccountLevel!
uid - ID!
Example
{"level": "ONE", "uid": 4}

AccountUpdateStatusInput

Fields
Input Field Description
comment - String
status - AccountStatus!
uid - ID!
Example
{
  "comment": "abc123",
  "status": "ACTIVE",
  "uid": "4"
}

AdminPushNotificationSendInput

Fields
Input Field Description
accountId - String
body - String
title - String
Example
{
  "accountId": "abc123",
  "body": "xyz789",
  "title": "xyz789"
}

AdminPushNotificationSendPayload

Fields
Field Name Description
errors - [Error!]!
success - Boolean
Example
{"errors": [Error], "success": false}

AuditedAccount

Description

Accounts are core to the Galoy architecture. they have users, and own wallets

Fields
Field Name Description
coordinates - Coordinates GPS coordinates for the account that can be used to place the related business on a map
createdAt - Timestamp!
id - ID!
level - AccountLevel!
owner - AuditedUser!
status - AccountStatus!
title - String
username - Username
uuid - String!
wallets - [Wallet!]!
Example
{
  "coordinates": Coordinates,
  "createdAt": 1592577642,
  "id": 4,
  "level": "ONE",
  "owner": AuditedUser,
  "status": "ACTIVE",
  "title": "xyz789",
  "username": Username,
  "uuid": "xyz789",
  "wallets": [Wallet]
}

AuditedUser

Fields
Field Name Description
createdAt - Timestamp!
email - Email Email address
id - ID!
language - Language!
phone - Phone
Example
{
  "createdAt": 1592577642,
  "email": Email,
  "id": 4,
  "language": Language,
  "phone": Phone
}

AuthToken

Description

An Opaque Bearer token

Example
AuthToken

AuthTokenPayload

Fields
Field Name Description
authToken - AuthToken
errors - [Error!]!
totpRequired - Boolean
Example
{
  "authToken": AuthToken,
  "errors": [Error],
  "totpRequired": false
}

BTCWallet

Description

A wallet belonging to an account which contains a BTC balance and a list of transactions.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount! A balance stored in BTC.
id - ID!
pendingIncomingBalance - SignedAmount! An unconfirmed incoming onchain balance.
transactions - TransactionConnection A list of BTC transactions associated with this wallet.
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

walletCurrency - WalletCurrency!
Example
{
  "accountId": 4,
  "balance": SignedAmount,
  "id": 4,
  "pendingIncomingBalance": SignedAmount,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "walletCurrency": "BTC"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

BusinessDeleteMapInfoInput

Fields
Input Field Description
username - Username!
Example
{"username": Username}

BusinessUpdateMapInfoInput

Fields
Input Field Description
latitude - Float!
longitude - Float!
title - String!
username - Username!
Example
{
  "latitude": 123.45,
  "longitude": 123.45,
  "title": "abc123",
  "username": Username
}

CaptchaCreateChallengePayload

Fields
Field Name Description
errors - [Error!]!
result - CaptchaCreateChallengeResult
Example
{
  "errors": [Error],
  "result": CaptchaCreateChallengeResult
}

CaptchaCreateChallengeResult

Fields
Field Name Description
challengeCode - String!
failbackMode - Boolean!
id - String!
newCaptcha - Boolean!
Example
{
  "challengeCode": "xyz789",
  "failbackMode": false,
  "id": "xyz789",
  "newCaptcha": false
}

CaptchaRequestAuthCodeInput

Fields
Input Field Description
challengeCode - String!
channel - PhoneCodeChannelType
phone - Phone!
secCode - String!
validationCode - String!
Example
{
  "challengeCode": "xyz789",
  "channel": "SMS",
  "phone": Phone,
  "secCode": "xyz789",
  "validationCode": "xyz789"
}

Coordinates

Fields
Field Name Description
latitude - Float!
longitude - Float!
Example
{"latitude": 123.45, "longitude": 123.45}

DisplayCurrency

Description

Display currency of an account

Example
DisplayCurrency

Email

Fields
Field Name Description
address - EmailAddress
verified - Boolean
Example
{
  "address": "test@test.com",
  "verified": false
}

EmailAddress

Description

Email address

Example
"test@test.com"

Error

Fields
Field Name Description
code - String
message - String!
path - [String]
Possible Types
Error Types

GraphQLApplicationError

Example
{
  "code": "xyz789",
  "message": "xyz789",
  "path": ["xyz789"]
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

GraphQLApplicationError

Fields
Field Name Description
code - String
message - String!
path - [String]
Example
{
  "code": "abc123",
  "message": "abc123",
  "path": ["xyz789"]
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

InitiationVia

Example
InitiationViaIntraLedger

InitiationViaIntraLedger

Fields
Field Name Description
counterPartyUsername - Username
counterPartyWalletId - WalletId
Example
{
  "counterPartyUsername": Username,
  "counterPartyWalletId": WalletId
}

InitiationViaLn

Fields
Field Name Description
paymentHash - PaymentHash!
Example
{"paymentHash": PaymentHash}

InitiationViaOnChain

Fields
Field Name Description
address - OnChainAddress!
Example
{"address": OnChainAddress}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Language

Example
Language

LightningInvoice

Fields
Field Name Description
confirmedAt - Timestamp
createdAt - Timestamp!
description - String!
expiresAt - Timestamp
isSettled - Boolean!
received - SatAmount!
request - LnPaymentRequest
secretPreImage - LnPaymentPreImage!
Example
{
  "confirmedAt": 1592577642,
  "createdAt": 1592577642,
  "description": "abc123",
  "expiresAt": 1592577642,
  "isSettled": false,
  "received": SatAmount,
  "request": LnPaymentRequest,
  "secretPreImage": LnPaymentPreImage
}

LightningPayment

Fields
Field Name Description
amount - SatAmount
confirmedAt - Timestamp
createdAt - Timestamp
destination - LnPubkey
request - LnPaymentRequest
revealedPreImage - LnPaymentPreImage
roundedUpFee - SatAmount
status - LnPaymentStatus
Example
{
  "amount": SatAmount,
  "confirmedAt": 1592577642,
  "createdAt": 1592577642,
  "destination": LnPubkey,
  "request": LnPaymentRequest,
  "revealedPreImage": LnPaymentPreImage,
  "roundedUpFee": SatAmount,
  "status": "FAILED"
}

LnPaymentPreImage

Example
LnPaymentPreImage

LnPaymentRequest

Description

BOLT11 lightning invoice payment request with the amount included

Example
LnPaymentRequest

LnPaymentSecret

Example
LnPaymentSecret

LnPaymentStatus

Values
Enum Value Description

FAILED

PENDING

SETTLED

Example
"FAILED"

LnPubkey

Example
LnPubkey

Memo

Description

Text field in a lightning payment transaction

Example
Memo

OnChainAddress

Description

An address for an on-chain bitcoin destination

Example
OnChainAddress

OnChainTxHash

Example
OnChainTxHash

OneTimeAuthCode

Description

An authentication code valid for a single use

Example
OneTimeAuthCode

PageInfo

Description

Information about pagination in a connection.

Fields
Field Name Description
endCursor - String When paginating forwards, the cursor to continue.
hasNextPage - Boolean! When paginating forwards, are there more items?
hasPreviousPage - Boolean! When paginating backwards, are there more items?
startCursor - String When paginating backwards, the cursor to continue.
Example
{
  "endCursor": "abc123",
  "hasNextPage": true,
  "hasPreviousPage": false,
  "startCursor": "xyz789"
}

PaymentHash

Example
PaymentHash

Phone

Description

Phone number which includes country code

Example
Phone

PhoneCodeChannelType

Values
Enum Value Description

SMS

WHATSAPP

Example
"SMS"

PriceInterface

Fields
Field Name Description
base - SafeInt!
currencyUnit - String! Deprecated due to type renaming
offset - Int!
Possible Types
PriceInterface Types

PriceOfOneSettlementMinorUnitInDisplayMinorUnit

Example
{
  "base": 9007199254740991,
  "currencyUnit": "abc123",
  "offset": 123
}

PriceOfOneSettlementMinorUnitInDisplayMinorUnit

Description

Price of 1 sat or 1 usd cent in base/offset. To calculate, use: base / 10^offset

Fields
Field Name Description
base - SafeInt!
currencyUnit - String! Deprecated due to type renaming
formattedAmount - String! Deprecated please use base / 10^offset
offset - Int!
Example
{
  "base": 9007199254740991,
  "currencyUnit": "abc123",
  "formattedAmount": "xyz789",
  "offset": 987
}

SafeInt

Description

Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1

Example
9007199254740991

SatAmount

Description

(Positive) Satoshi amount

Example
SatAmount

SettlementVia

Example
SettlementViaIntraLedger

SettlementViaIntraLedger

Fields
Field Name Description
counterPartyUsername - Username Settlement destination: Could be null if the payee does not have a username
counterPartyWalletId - WalletId
Example
{
  "counterPartyUsername": Username,
  "counterPartyWalletId": WalletId
}

SettlementViaLn

Fields
Field Name Description
paymentSecret - LnPaymentSecret Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type
preImage - LnPaymentPreImage
Example
{
  "paymentSecret": LnPaymentSecret,
  "preImage": LnPaymentPreImage
}

SettlementViaOnChain

Fields
Field Name Description
transactionHash - OnChainTxHash
vout - Int
Example
{"transactionHash": OnChainTxHash, "vout": 123}

SignedAmount

Description

An amount (of a currency) that can be negative (e.g. in a transaction)

Example
SignedAmount

SignedDisplayMajorAmount

Description

A string amount (of a currency) that can be negative (e.g. in a transaction)

Example
SignedDisplayMajorAmount

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

SuccessPayload

Fields
Field Name Description
errors - [Error!]!
success - Boolean
Example
{"errors": [Error], "success": false}

Timestamp

Description

Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch)

Example
1592577642

Transaction

Description

Give details about an individual transaction. Galoy have a smart routing system which is automatically settling intraledger when both the payer and payee use the same wallet therefore it's possible the transactions is being initiated onchain or with lightning but settled intraledger.

Fields
Field Name Description
createdAt - Timestamp!
direction - TxDirection!
id - ID!
initiationVia - InitiationVia! From which protocol the payment has been initiated.
memo - Memo
settlementAmount - SignedAmount! Amount of the settlement currency sent or received.
settlementCurrency - WalletCurrency! Wallet currency for transaction.
settlementDisplayAmount - SignedDisplayMajorAmount!
settlementDisplayCurrency - DisplayCurrency!
settlementDisplayFee - SignedDisplayMajorAmount!
settlementFee - SignedAmount!
settlementPrice - PriceOfOneSettlementMinorUnitInDisplayMinorUnit! Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement.
settlementVia - SettlementVia! To which protocol the payment has settled on.
status - TxStatus!
Example
{
  "createdAt": 1592577642,
  "direction": "RECEIVE",
  "id": "4",
  "initiationVia": InitiationViaIntraLedger,
  "memo": Memo,
  "settlementAmount": SignedAmount,
  "settlementCurrency": "BTC",
  "settlementDisplayAmount": SignedDisplayMajorAmount,
  "settlementDisplayCurrency": DisplayCurrency,
  "settlementDisplayFee": SignedDisplayMajorAmount,
  "settlementFee": SignedAmount,
  "settlementPrice": PriceOfOneSettlementMinorUnitInDisplayMinorUnit,
  "settlementVia": SettlementViaIntraLedger,
  "status": "FAILURE"
}

TransactionConnection

Description

A connection to a list of items.

Fields
Field Name Description
edges - [TransactionEdge!] A list of edges.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [TransactionEdge],
  "pageInfo": PageInfo
}

TransactionEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination
node - Transaction! The item at the end of the edge
Example
{
  "cursor": "xyz789",
  "node": Transaction
}

TxDirection

Values
Enum Value Description

RECEIVE

SEND

Example
"RECEIVE"

TxStatus

Values
Enum Value Description

FAILURE

PENDING

SUCCESS

Example
"FAILURE"

UsdWallet

Description

A wallet belonging to an account which contains a USD balance and a list of transactions.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount!
id - ID!
pendingIncomingBalance - SignedAmount! An unconfirmed incoming onchain balance.
transactions - TransactionConnection
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

walletCurrency - WalletCurrency!
Example
{
  "accountId": "4",
  "balance": SignedAmount,
  "id": "4",
  "pendingIncomingBalance": SignedAmount,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "walletCurrency": "BTC"
}

UserLoginInput

Fields
Input Field Description
code - OneTimeAuthCode!
phone - Phone!
Example
{
  "code": OneTimeAuthCode,
  "phone": Phone
}

UserRequestAuthCodeInput

Fields
Input Field Description
channel - PhoneCodeChannelType
phone - Phone!
Example
{"channel": "SMS", "phone": Phone}

UserUpdatePhoneInput

Fields
Input Field Description
accountId - ID!
phone - Phone!
Example
{"accountId": 4, "phone": Phone}

Username

Description

Unique identifier of a user

Example
Username

Wallet

Description

A generic wallet which stores value in one of our supported currencies.

Fields
Field Name Description
accountId - ID!
balance - SignedAmount!
id - ID!
pendingIncomingBalance - SignedAmount!
transactions - TransactionConnection Transactions are ordered anti-chronologically, ie: the newest transaction will be first
Arguments
after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

transactionsByAddress - TransactionConnection Transactions are ordered anti-chronologically, ie: the newest transaction will be first
Arguments
address - OnChainAddress!

Returns the items that include this address.

after - String

Returns the items in the list that come after the specified cursor.

before - String

Returns the items in the list that come before the specified cursor.

first - Int

Returns the first n items from the list.

last - Int

Returns the last n items from the list.

walletCurrency - WalletCurrency!
Possible Types
Wallet Types

BTCWallet

UsdWallet

Example
{
  "accountId": "4",
  "balance": SignedAmount,
  "id": 4,
  "pendingIncomingBalance": SignedAmount,
  "transactions": TransactionConnection,
  "transactionsByAddress": TransactionConnection,
  "walletCurrency": "BTC"
}

WalletCurrency

Values
Enum Value Description

BTC

USD

Example
"BTC"

WalletId

Description

Unique identifier of a wallet

Example
WalletId