Get Protocol

Use this endpoint to retrieve detailed information about a specific protocol, such as its name, description, and more.
Example use cases:

  • A developer wants to integrate a specific protocol into their platform and needs to retrieve its key information.
  • A researcher wants to study a specific protocol.
import PulsarSDK from 'pulsar_sdk_js'

const sdk = new PulsarSDK(API_KEY)
sdk.protocols.get_protocol('REDACTOR').then((protocol) => console.log(protocol))
from pulsar_sdk_py import PulsarSDK

sdk = PulsarSDK(API_KEY)
protocol = sdk.protocols.get_protocol(protocol_key="REDACTOR")

List Protocols

Use this endpoint to retrieve a list of all protocols that are supported by a given blockchain.
Example use cases:

  • A user wants to explore the various protocols available on a chain.
  • A developer wants to build a tool that supports all protocols on a specific blockchain.
import PulsarSDK, { ChainKeys } from 'pulsar_sdk_js'

const sdk = new PulsarSDK(API_KEY)
sdk.protocols.list_protocols(ChainKeys.TERRA2).then((paginated_protocols) => {
    console.log(paginated_protocols)
})
from pulsar_sdk_py import PulsarSDK
from pulsar_sdk_py.enums import ChainKeys

sdk = PulsarSDK(API_KEY)
paginated_protocols = sdk.protocols.list_protocols(chain=ChainKeys.TERRA2)

Get Number Protocols

Use this endpoint to retrieve the total number of protocols available in our platform.
Example use cases:

  • A user wants to know how many protocols are available.
import PulsarSDK from 'pulsar_sdk_js'

const sdk = new PulsarSDK(API_KEY)
sdk.protocols.get_number_protocols().then((number_of_protocols) => {
    console.log(number_of_protocols)
})
from pulsar_sdk_py import PulsarSDK

sdk = PulsarSDK(API_KEY)
number_of_protocols = sdk.protocols.get_number_protocols()

Get Filtered Protocols

Use this endpoint to retrieve a paginated list of protocols that match the given filters and sorted by specified criteria.
Example use cases:

  • A user wants to explore protocols matching certain criteria to inform their investment decisions.
  • A developer wants to build a tool that retrieves protocols based on specific filters.
import PulsarSDK, { ChainKeys, GetFilteredProtocolsOptions } from 'pulsar_sdk_js'

const sdk = new PulsarSDK(API_KEY)
const options: GetFilteredProtocolsOptions = {
    chains: [ChainKeys.TERRA2],
}
sdk.protocols.get_filtered_protocols(options).then((protocols_list) => {
    console.log(protocols_list)
})
from pulsar_sdk_py import PulsarSDK
from pulsar_sdk_py.enums import ChainKeys

sdk = PulsarSDK(API_KEY)
protocols_list = sdk.protocols.get_filtered_protocols(chains=[ChainKeys.TERRA2])

Get Protocol Timeseries

Use this endpoint to retrieve metrics of a protocol over a period of time with a given id.
Example use cases:

  • A researcher wants to study the performance of a protocol over a given period of time.
  • A developer wants to build a tool that displays the historical performance of a specific protocol.
import PulsarSDK, { TierKeys } from 'pulsar_sdk_js'

const sdk = new PulsarSDK(API_KEY)
sdk.protocols.get_protocol_timeseries('REDACTOR', TierKeys.ONE_WEEK).then((timeseries) => {
    console.log(timeseries)
})
from pulsar_sdk_py import PulsarSDK
from pulsar_sdk_py.enums import TierKeys

sdk = PulsarSDK(API_KEY)
timeseries = sdk.protocols.get_protocol_timeseries(protocol_key="REDACTOR", tier_name=TierKeys.ONE_WEEK)